Click here to Skip to main content
15,891,431 members
Everything / Batch

Batch

batch

Great Reads

by Simon P Stevens
How to set the current directory correctly when running batch scripts as administrator
by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively
by Dan Randolph
Builds on the existing RunRemote project to run commands on a remote server.
by Reto70
if you want to run the script in the folder where the script is store you can add the following code@ECHO %0 %*@pushd@cd /D "%~dp0"@cd....@pause@popdin most case %0 is the name of the script including the full path%~dp0 is only the drive and the path of the scriptcd...

Latest Articles

by honey the codewitch
Presenting a simple to create understandable and maintainable builds for projects with dependencies
by ToughDev
How to identify used and unused resources in VS Project Resources.resx file
by FormerBIOSGuy
This article describes a set of batch, AWK, and PostScript files that together allow you to create personalized, 12-page PDF calendars for some year.
by Chris Maunder
A quick overview and a simple Windows CMD script to make your terminal output a little more lively

All Articles

Sort by Title

Batch 

25 Nov 2013 by Nicola De Biasi
Hi guys,I want you to help me to solve a problem.I'd like, via a batch file or c++ program, to copy everything from a usb pen into the hdd, just when I insert the usb pen. Basically when the pc is turned on the sw starts and it waits until a usb pen is inserted and then the sw copies...
22 May 2022 by Phoenix Liveon
We have this "Continuing Lines" in Linux, with '\' #inside of a bash file command \ \ \ ... what about the Windows own implementation? What I have tried: inside of .bat file, I...
25 Apr 2022 by OriginalGriff
It's the "^" character, but it must be the last character on the line: it can't be followed by a space or anything else. Try it: WINKEY+R, "cmd" ENTER "cd^" It will respond "More?" "\" ENTER The current directory will chance to root. Yes, it...
17 Feb 2012 by OriginalGriff
Reason for my vote of one: You want to write a virus.
22 Mar 2014 by mohammadali1375
Hi.I have this batch fileSET jlinklocation = D:\Program Files\SEGGER\JLinkARM_V482\cd /d %jlinklocation %(echo Device AT91SAM7S64echo loadbin C:\binfile.bin 0X100000)|jlink.exeexitMy problem is taht the AT91SAM7S64 have an space after it. and jlink program want use this...
22 Mar 2014 by Sergey Alexandrovich Kryukov
First of all, you cannot use "%jlinklocation %", it should be "%jlinklocation%", otherwise reference to the set symbol won' work. As to the blank space in "AT91SAM7S64 " and related problem is not manifested in your code sample anyhow.echo Device AT91SAM7S64simply outputs string in the...
17 May 2015 by Armand Peens
Hi GuysThis is my first time doing this so how do I write a script that shows specific text when a user logs on or has to change a password? Or do you know of an existing script that meets my exact requirements that I can just edit and put my own text in because it's for a project at work...
17 May 2015 by OriginalGriff
It doesn't quite work like that.We do not do your work for you.If you want someone to write your code, you have to pay - I suggest you go to Freelancer.com and ask there.But be aware: you get what you pay for. Pay peanuts, get monkeys.
21 May 2021 by webmail123
I have a batch file that is scheduled to run after every half hour in the windows scheduler. The batch file will create a text file and it will write some data into a text file. In that, I want to run a command line to count the number of folders...
12 May 2020 by Richard MacCutchan
Try this : @echo off echo # Title to be displayed echo # Purpose to count the directories in a folder rem save the count in a variable to use below dir /b /ad "C:\Users\rjmac\Documents\Code" | find /c /v"" > zz set /p count=
21 May 2021 by l o o l
You can get the value in a variable without creating/read a file and in a line.. @echo off >"c:\demo.txt" ( echo # Title to be displayed echo # Purpose to count the directories in a folder for /f %%i in ('dir/b/ad...
27 Nov 2012 by Naveen_143
Hello,I need to do the following process automatically thorugh code(vb console app. or with commands in bat files) MyComputer -> Tools -> Folder options -> File Types tab -> New I need to add a new file type "GZ" through code(not manual process). I came to know that we can do this...
28 Nov 2012 by Richard MacCutchan
See this white paper[^]. You also need to check that the type you want to add is not already in use; on my system .gz is already registered.
13 Dec 2012 by Naveen_143
We can accomplish this by using REG commands.REG ADD "HKEY_CLASSES_ROOT\.gz" /ve /d ft000005finding the correct Dword data is important.
29 Apr 2022 by mahabir das
i'm trying to get administrative permission (without UAC prompt) What I have tried: @echo off goto check_Permissions :check_Permissions SET "C:\Users\BDAS\Desktop\check_admin=%~dp0"&SET "check_admin=%~dpf0" net...
29 Apr 2022 by Richard MacCutchan
And we have already explained to you more than once that you cannot bypass the UAC prompt. It is there for a very good reason, i.e. to prevent illegal access to secure data on your system.
29 Apr 2022 by OriginalGriff
How many times do we have to tell you the same thing before you understand? You cannot bypass UAC though C#, PHP, Python, .BAT, Powershell, Adobe PDF, COBOL, assembly code, machine code, OldUncleTomCobly code, or Caesar cypher. It is built into...
29 Apr 2022 by Dave Kreskowiak
Again, you can NOT get admin permissions or access to anything without the UAC prompt. It's there to prevent you from doing what you're trying to do, and that's get admin level access to something without the users knowledge of it happening. ...
3 Aug 2020 by Member 14864964
In the following batch script, I would like to be able to input multiple choice at a time from the menu. For example, choice 1, 3 and 5. And make the /LOADFILES argument take only one item at a time using a loop : @echo off setlocal set...
16 Jun 2020 by Richard MacCutchan
You need to use the set and for commands to get and parse the values. The following example merely echoes them back to the console, but should give you the idea. set /P choice=What are your choices? echo %choices% for %%i in (%choices%) do echo...
3 Aug 2020 by l o o l
Something very similar I did some time ago, below is an adaptation / merging with your code and also using for... this is string %errorlevel% == 1 and this is int comparation %errorlevel% EQU 1 @echo off && setlocal enabledelayedexpansion...
17 May 2022 by Graeme Cooper
Trying to change a service from automatic start to automatic delayed started because there seems to be some issues with the service not starting up upon user login. What I have tried: I'm using Spooler as the target service for test purposes. The part where I'm stuck is getting my batch file...
7 Feb 2019 by CHill60
It seems you and Richard are not the only ones! I was going to suggest the same thing that @Richar-MacCutchan has just mentioned - i.e. you may need to stop or disable it first. In the meantime I did find a work-around here at ITExperience.NET[^] (Caveat - I have not tried this myself)
7 Feb 2019 by Dave Kreskowiak
Easy. The print spooler doesn't support delayed auto start.
17 May 2022 by Gazzazza
If your service is part of a load order group it cannot be changed to use delayed auto start. You would need to remove it from the load order group. For example, for the print spooler: sc config Spooler group = "" sc config Spooler...
12 Feb 2019 by Graeme Cooper
I've created a batch file that changes the startup type of a service to automatic (delayed start) and now have attached a script which checks that the service is running and if not starts it, however when testing they don't seem to work at all. source of service restart portion of my script:...
11 Feb 2019 by RickZeeland
The DOS timeout command is often problematic, I would advise to use a PowerShell script, this also allows you to wait for a process to finish. # Wait for all processes starting with Unins to finish # Time out after 1 minute Write-Host "Waiting ..." wait-process -name Unins* -Timeout 60...
12 Feb 2019 by Graeme Cooper
Remove quotation marks at the SET SvcName part of the script. Mission accomplished.
17 Oct 2011 by nina4ever
I know this question has been asked several times before. I’m working on a web application, and I need to execute a batch file on a remote machine. I`v tried two approaches: psexec and WMI, and they worked, but both of them take a long time to acquire a connection to the remote machine (5-10...
18 Oct 2011 by nina4ever
my batch file (on the remote server) calls an application that extracts users information from AD and writes it to a .txt file...In my web application i used to following code to execute that batch file.ConnectionOptions options = new ConnectionOptions();options.Username =...
15 Jul 2013 by G4mm4R4y
I have a batch script and the problem is I need the file to automatically call on and automatically input a variableI need something like this: ::"a" Is a batch file its main contents will be after thisa VAR::VAR is a the value of a variable that needs inputthis is a.bat: cd...
15 Jul 2013 by Maciej Los
Have a look here:http://stackoverflow.com/questions/1515965/how-to-input-a-string-from-user-into-environment-variable-from-batch-file[^]http://snipplr.com/view/14953/[^][EDIT #1]If you want to call another batch file with input parameter try this:first.batsecond.bat "Hello...
16 Jul 2013 by Sergey Alexandrovich Kryukov
You code has a number of bugs. Please consider this:@echo offdefine parameter=%1echo This is first: %1if "%parameter%"=="" set /p parameter=Enter parameter value: echo %parameter%pausePay attention: command-line parameter is %1, not %%1; there is not "defined"; you should...
1 Feb 2022 by Marijan Nikic
How to set AIP label via VBScript code
8 Dec 2015 by Member 12181658
i have .txt files in C:\Users\Documents\Backupi want to backup them to other directory for every 2 minutes C:\Users\Documents\ArchiveUpcould anyone tell me how can i do it??
8 Dec 2015 by CHill60
For the timing have a look at the Windows Task Scheduler[^]As for the script to copy them, there are numerous examples available e.g. see this post[^]
8 Dec 2015 by phil.o
The script could be something like (.bat or .cmd file):@echo offrobocopy "C:\Users\Documents\Backup" "C:\Users\Documents\ArchiveUp" /MIRYou can find more options for robocopy program by simply typing robocopy /?.Then you can use the Windows Task Scheduler to schedule the execution...
8 Dec 2015 by Richard Deeming
If you don't want to use the Task Scheduler, use robocopy's "MOT" option:robocopy:/MOT:m :: MOnitor source; run again in m minutes Time, if changed.robocopy "C:\Users\Documents\Backup" "C:\Users\Documents\ArchiveUp" /MIR /MOT:2Specifying a Copy Schedule in Robocopy[^]
31 Mar 2013 by berba
I need some help regarding a bat file. I require a bat file doing the followings: Copy file from 1 folder to anotherRename file after copying - add a prefix at the beginning of the filename
31 Mar 2013 by Thomas Daniels
To copy, have a look here:http://stackoverflow.com/questions/986447/batch-file-to-copy-files-from-one-folder-to-another-folder[^]To rename, have a look...
1 Apr 2013 by Richard MacCutchan
zz.batcd %1copy %2 %3\pfx%2zz sourcedirectory filename destinationdirectory
26 Jan 2014 by Member 7925220
I need to create mysql database through .bat file, but don't know how to do that help me to know .bat file creation for create database cmd.
26 Jan 2014 by Richard MacCutchan
Creating a .bat file can be done with any text editor, such as Notepad. All you have to do is set the correct path and other environment variables for the SQL commands, and add those commands into the file.
26 Jan 2014 by Peter Leow
Check this out: using-batch-files-to-create-mysql-databases[^]
5 Mar 2013 by Ger Hayden
In a thowback to the '80's I am using a batch script to log SOAP injectionsThe output file name is time stamped but it only works properly after 10:00!echo onecho %DATE%echo %TIME%set datetimef=%date:~-4%_%date:~3,2%_%date:~0,2%__%time:~0,2%_%time:~3,2%_%time:~6,2%echo...
6 Mar 2013 by Richard MacCutchan
You could extract the first character of the time value and if it's a space rebuild it with a leading zero. Something like (my .bat skills being rusty):set Z=%time:~0,1%if %Z% NEQ 0 set Z=0set newtime=%Z%%time:~1,7%Reviewing this I realise you need to check for the digits 1 and 2 also.
9 Dec 2014 by Sujith Balan
I want to write a batch file to add in task scheduler.the batch file contains the function to call a c# file from project..how to write the batch file for this operation.pls helpthanks in advance
9 Dec 2014 by OriginalGriff
Call the batch file "RUNME.BAT", then make it's content:PathToTheExecutable\ExecutableFileNameSo if your app is on the D drive, in the Temp folder, and called MyApp.exe, then teh file will contain:D:\Temp\MyApp
2 Aug 2015 by Arjun Menon U.K
Hi,I am trying to open a specific excel spreadsheet using batch command like this. But its not opening the correct spreadsheet , can anyone please help me.@ECHO OFF"C:\Program Files (x86)\Microsoft Office\Office15\EXCEL.EXE" "G:\Path\MyFile.xlsm" /e/SpreadSheetNameexit
2 Aug 2015 by Sergey Alexandrovich Kryukov
That's would be simply@echo offstart yourExcelWorkbookDocument.xlsx—SA
5 Dec 2012 by esonparedes
I have .xml file in my folder. I want to specifically transfer them to another folder.For Example:FOLDER A:2012P02B.XML2012P02B.XML2012PCXB.XML2012P80K.XML2012PC6H.XML2012P93L.XML2012P02X.XMLI want to transfer all of the others except to "2012P02B.XML" to FOLDER...
5 Dec 2012 by OriginalGriff
Use the wildcards: "*" is "any text", "?" is "any character"Try:copy 2012P02?.XML C:\FOLDERB
5 Dec 2012 by Elerian
If you want to move all files except one single file, you can rename it before moving the other files and restore it when your done.set KEEPFILE=2012P02B.XMLset TARGETDIR=C:\FOLDERBren %KEEPFILE% %KEEPFILE%.keptmove *.XML %TARGETDIR%ren %KEEPFILE%.kept %KEEPFILE%
5 Dec 2012 by esonparedes
How to get the letters/word in a filename?For Example: 2012P02B.xml - i just want to get the letters: "P02B"Please help me. Thanks and Regards!
5 Dec 2012 by Pablo Aliskevicius
What do you mean by "get"? ECHO? Write to a file? Load into a variable?To get echo, try this:DIR 2012*.XML /B > TEST.TXTfor /F "eol=. tokens=2 delims=2." %i in (test.txt) do @echo %iThe first line creates a text file with bare names of all matching files.The second line runs on the...
18 Oct 2013 by xmark1rax
Need write to file %variable%, instead of its "value". Basically what I have:@ECHO OFFSET variable=2ECHO Some text... > file.batECHO %variable% >> file.batECHO More text.. >> file.batWHAT I GET, file.bat:Some text...2More text...WHAT I WANT, file.bat:Some...
18 Oct 2013 by xmark1rax
I found a solution: Instead of %variable%, write %%variable%%.So in order to display/write one %, write ECHO %%.
10 Apr 2021 by Luiey Ichigo
Hi all,Does anyone know the command line to compress a folder to zip? Like on our default Windows OS, even we don't install 3rd party software to compress, we also can compress the folder by right click the folder/file and Send To --> Compressed (Zipped)Is it possible to compress the...
20 Feb 2013 by Sergey Alexandrovich Kryukov
If you really want to do it without using any 3-rd party compress utility, with just the batch, you can use Windows Script Host (WSH):http://en.wikipedia.org/wiki/Windows_Script_Host[^].You can find a good number of code samples, this is just one of them:...
10 Apr 2021 by Member 15145375
unzip in batch @echo off if "%1"=="" goto end setlocal set TEMPDIR=%TEMP%\ZIP set FILETOZIP=%1 set OUTPUTZIP=%2.zip if "%2"=="" set OUTPUTZIP=%1.zip :: preparing VBS script echo Set objArgs = WScript.Arguments > _zipIt.vbs echo InputFolder...
1 Mar 2011 by Indivara
Are you sure your batch file will actually do what you intended?
1 Mar 2011 by Br.Bill
First command of the file should be:PUSHD directory_you_want_to_be_inThat solves it always. No testing for anything. No need to error out, because your expected file's gonna be in the expected directory.
1 Mar 2011 by Reto70
if you want to run the script in the folder where the script is store you can add the following code@ECHO %0 %*@pushd@cd /D "%~dp0"@cd....@pause@popdin most case %0 is the name of the script including the full path%~dp0 is only the drive and the path of the scriptcd...
24 Feb 2014 by Member 10621858
Hi,I got a requirement on the batch file script but I am new to write the Batch file script.I hope can anyone will help me out on the requirement.Here is the requirement. 1) I have Application and Database servers.2) Batch file run on Application server.3) connect to Database...
24 Feb 2014 by Sergey Alexandrovich Kryukov
Almost anything here is not accessible to batch. You can do it in the batch, but only if you use it to run some applications for database operations, logging, pretty much everything. But if you have to write such applications anyway, it would become quite questionable: why using the...
7 Oct 2016 by Shafikul
I have one .bat file which is responsible to take SQL Server database Backup and that is running by Windows Task Scheduler at 3.01 AM daily. Last 7 days it worked perfectly okay but today it failed. I got below information from Event Log.It is Windows 2008 Server. It developed long back ago,...
7 Oct 2016 by David_Wimbley
Your error isn't with your batch file it is with your server.https://technet.microsoft.com/en-us/library/cc735059%28v=ws.10%29.aspx[^]If you look at the documentation it even saysQuote:The event log message is informational regarding performance counter status. The issue will be...
18 Feb 2023 by Eddie Winch
Hi there, I have the following line of Code in a Batch File :- set "SourceFolder=C:\Users\eddyw\Desktop\PAC_PNL Misc\PAC-MISC\pacbob1940" for %%a in ("%SourceFolder%\*.PAC") do PAC-MISC.exe -d Test_Files "%%a" The Batch File runs a C...
10 Feb 2023 by Dave Kreskowiak
First, the SET statement does not need the quotes around it at all. Next, the problem is going to be with the command you're running as part of the FOR statement, or the batch files ability to find the command. Is the batch file in the same...
10 Feb 2023 by Richard MacCutchan
You have a space character in the directory path, which will cause the path passed in the for statement to be interpreted as "C:\Users\eddyw\Desktop\PAC_PNL". Try changing the set statement to the following, removing the double quote in front of...
19 Feb 2023 by l o o l
@echo off cd /d "C:\Users\eddyw\Desktop\PAC_PNL Misc\PAC-MISC" pushd "C:\Users\eddyw\Desktop\PAC_PNL Misc\PAC-MISC\Test_Files" for %%i in (*.PAC)do PAC-MISC.exe -d . "%%~nxi" popd I have a feeling that the program already handles its argument...
26 Sep 2011 by Member 7766180
This batch file isn't deleting. The error I am getting is path not found. I want to delete any *.zip, *.txt files anywhere on my c drive that are less than a minute old.@echo offsetlocalcall :DateToMinutes %date:~-4% %date:~-10,2% %date:~-7,2% %time:~0,2% %time:~3,2% NowMinsfor /f...
26 Sep 2011 by E.F. Nijboer
Could it be you're script is somewhat complicated? Maybe you could resolve the problem more simple. Have a look at the links below to see what I mean.http://scottelkin.com/programming/delete-files-older-than-date-using-batch-files/[^]http://www.computerhope.com/backup.htm[^]Good luck!
27 Sep 2011 by Member 7766180
This works, Sublimely!!!!!!!!!!@echo off setlocal for /f "delims=" %%b in ("%time%") do set "tm=%%b" set "tm=%tm:~0,5%" set "tm=%tm: =0%" for /f "tokens=2" %%b in ("%date%") do set "d8=%%b" set filespec=\*.zip \*.txt \*.jpg for /f "delims=" %%a in (' dir %filespec% /a:-d...
22 Jan 2014 by xxv2012
i want batch file to check if exist in the main drive for exampleset /p test=type the file:if %test%== %drivename% goto finif %test%== %drivename% goto end:finecho the file is in the main partition pauseexit:endecho the file is not in the main partition pauseexit
16 May 2014 by Klaus Wirl
Could something like this do what you expect?@echo offset /P test=type the file:call :check_main "%test%"pausegoto :EOF:check_mainif "%~d1" == "%HOMEDRIVE%" ( echo the file is in the main partition) else ( echo the file is not in the main partition)goto...
25 Mar 2015 by Joezer BH
I need the syntax of a simple batch file that will copy a file from a root folder to all subfolders (not recursive) that start with a prefix. E.g.: I need the batch file c:\MyRoot\CopyCfgToSubs.bat with a for loop that will copy the file c:\MyRoot\My.configinto each of the sub folders:...
26 Mar 2015 by Richard MacCutchan
In CMD it's Something like:cd \MyRootfor /D %x in (MySub*) do copy a.config %xand inside a batch file:cd \MyRootfor /D %%x in (MySub*) do copy a.config %%x
6 Nov 2012 by PRAKASH_N
Hi Friends,I want to delete a table from an Access database using a batch file.Any ideas?
6 Nov 2012 by E.F. Nijboer
You would need to add a DeleteTable macro to it. You could then use the Command to read the given commandline argument, which would be the table name in this case. Try add a macro something like this:Public Sub DropTable() On Error Resume Next DoCmd.RunSQL "DROP TABLE " & CommandEnd...
4 Dec 2014 by Member 8073143
Hi all tech geeksi am using the following command all is fine it deleted the files from the folder i just want to add another condition that the files which are 3 days older gets only deletedpushd "C:\Bhaskar_Backup\Mail_BOX" && (rmdir . /s /q & popd )
4 Dec 2014 by Tomas Takac
I found this on StackOverflow: DOS Batch file to find “new” files by date[^]Then you just need to go trough the list in a FOR loop and delete the files.
25 Apr 2016 by Passion4Code
Would like to get some suggestions on creating a batch file executing which, a URL Scheme would get merged to Windows Registry (to execute an exe from web application).What I have tried:I have manually registered and added, I would like the same to be done by a batch file, instead of...
25 Apr 2016 by RickZeeland
You could use a .reg file, something like this: @echo off rem set __COMPAT_LAYER=RunAsInvoker REGEDIT.EXE /S "%~dp0\file.reg" pauseSee this for an explanation: windows - How to make a batch file execute a reg file - Stack Overflow[^]
3 Jun 2015 by dj4400
Hi all. I need to create a batch file that starts a program with a file name as a patameter. After it finishes, i want to activate the program again on a file with the same name but in the next folder in the directory. For example the parameter file name is test.xml, and i have 3 such...
3 Jun 2015 by Richard MacCutchan
Something like:for /d %x in (*) do echo prog.exe %x\test.xml
25 Sep 2013 by Maciej Los
Have a look here: How can I detect that MySQL is already installed?[^].
24 Sep 2013 by Phionix11
Hi All,I am stuck at one point of batch file creation where I want to check if the windows system is already having MySql installed or not and if it is installed then what is the version. If the MySql is not installed on system then start a new installation of MySql on windows...
20 Nov 2013 by Phionix11
Hi All,I am new to batch file and I am stuck at one point, where I want to check if the process exist in the startup or in other words if a process is installed on that machine.I have used below command ,1] tasklist /fi "imagename eq abcProcess.exe" /NHEven I used below,2]...
6 Feb 2013 by znyls
I need to do this in a batch file:1. Open cmd2. Run VS Command Prompt via cmd3. Execute this command "makecert -sv SignRoot.pvk -cy authority -r sha1 -a -n \"CN=Certificate\" -ss my -sr localmachine certificate.cer"So far, I've done 1 and 2, my problem is getting into...
6 Feb 2013 by H.Brydon
I think what you want to do is open a command window with the VS2010 compiler environment defined and execute the 'makecert' stuff in it.Rather than what you have described above, do this:Click Start -> (all programs) -> Microsoft Visual Studio 2010 -> Visual Studio Tools -> Visual...
7 Feb 2013 by Sergey Alexandrovich Kryukov
Remove CMD.EXE part, it's totally redundant.[EDIT]Thank you for clarification. Now, not only getting rid of CMD.EXE mean removing redundant tool, it's also critical.Visual Studio Prompt is interactive, something you don't want. It really is executed via %comspec% which is the same...
7 Feb 2013 by H.Brydon
It seems that you want to add the VS2010 environment to the current command window. Here is how to do it... Go to the "Visual Studio Command Prompt (2010)" menu described in Solution 1, but instead of clicking on it (ie. left click), do a right click, select properties. In the 'Target' edit...
27 Mar 2016 by Kasthuri Gunabalasingam
I have created a sqlex.bat file , it contains set of cmd commands,C:\Program Files\MySQL\MySQL Server 5.1\binMYSQL --user=root mysqlCREATE USER 'User89'@'localhost' IDENTIFIED BY 'aaa';when I run this sqlex.bat file, it executes first line only!How can I resolve...
27 Mar 2016 by Mehdi Gholam
Try (all one line):c:\> "C:\Program Files\MySQL\MySQL Server 5.1\bin\MYSQL" --user=root -e "CREATE USER 'User89'@'localhost' IDENTIFIED BY 'aaa';"
27 Mar 2016 by Patrice T
C:\Program Files\MySQL\MySQL Server 5.1\binthis line does nothing if bin is not an executable. ButCD "C:\Program Files\MySQL\MySQL Server 5.1\bin"would make sense.MYSQL --user=root mysqlThis one launch MYSQL if ypu are in right context.CREATE USER 'User89'@'localhost' IDENTIFIED BY...
6 Nov 2013 by Braydon
Hello People I wanted to make a batch file do something if the number of a text file has the text changed. Like if a text file text is 1.0 in the file cver.txt and I change it to 1.3 How do I make the batch file notice that and display text saying the file cver.txt has changed please go and get...
6 Nov 2013 by _Damian S_
One option would be to record the current number in a database somewhere, then compare that to the version of the file.
6 Nov 2013 by ArunRajendra
I am not sure but I guess this will help you to get started. By the way this is based on power shell script and not batch file. This post for new files instead you can query for modified date and time. Check this link.powershell-check-folder-for-new-files[^]
28 Mar 2013 by Sicppy
I have a small block of code that is supposed to parse through a file called data.dta but for some reason it keeps saying ( unexpected, here is the code(I put a comment by the line that gives me an error)::loadcd %appdata%\.TrekFOR /f "eol=#" %%t IN (Resources\Data\data.dta) DO (...