Checking if a folder exists using a .bat file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. This question appears to be off-topic because it lacks sufficient information to diagnose the problem. Describe your problem in more detail or include a minimal example in the question itself. Closed 8 years ago. Improve this question I would like … Read more

How to read file contents into a variable in a batch file?

This batch file releases a build from TEST to LIVE. I want to add a check constraint in this file that ensures there is an accomanying release document in a specific folder. “C:\Program Files\Windows Resource Kits\Tools\robocopy.exe” “\\testserver\testapp$” “\\liveserver\liveapp$” *.* /E /XA:H /PURGE /XO /XD “.svn” /NDL /NC /NS /NP del “\\liveserver\liveapp$\web.config” ren “\\liveserver\liveapp$\web.live.config” web.config So … Read more

Run a batch file with Windows task scheduler

I have a batch file daily.bat, this is the code: cd C:\inetpub\wwwroot\infoweb\factuur\cron c:\PHP\php.exe -f ./cron_pdf.php ftp -s:ftp_upload.txt ftp.site.be And I created a task with task scheduler in Windows 7. When I run the batch manually, everything goes fine, but when I try to run it with the task scheduler nothing happens. My action is ‘run … Read more

What are the undocumented features and limitations of the Windows FINDSTR command?

The Windows FINDSTR command is horribly documented. There is very basic command line help available through FINDSTR /?, or HELP FINDSTR, but it is woefully inadequate. There is a wee bit more documentation online at https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/findstr. There are many FINDSTR features and limitations that are not even hinted at in the documentation. Nor could they … Read more

Why does only the first line of this Windows batch file execute but all three lines execute in a command shell?

I have a batch file that executes three Maven commands, one after the other. Each command can be successfully executed in the script – by itself!. But when I add all three commands to the same file, only the first one executes before the script exits. Any idea why? mvn install:install-file -DgroupId=gdata -DartifactId=base -Dversion=1.0 -Dfile=gdata-base-1.0.jar … Read more