|
I have a batch file like this, the issue that I have is that if the first batch file fails, the second one never gets started, how can I get them to both keep going?
@echo off MapNetworkDrive_J.cmd MapNetworkDrive_Y.cmd
I have tried this:
@echo off start...
Started by Nate Bross on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at serverfault):
Hello,
Try to replace start by cmd -c
Use the call command:
@echo off call MapNetworkDrive_J.cmd call MapNetworkDrive_Y.cmd .
|
|
Consider a directory structure containing the following files:
\1.3\Baseline\GeneratedScripts\One\FullInstall.cmd \1.3\Baseline\GeneratedScripts\Two\FullInstall.cmd \1.3\Baseline\GeneratedScripts\Three\FullInstall.cmd \1.3\Patches\Patch1\GeneratedScripts...
Started by Daniel Fortunov on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
If you need to run the same batch file on multiple directories, create another ....
FullInstall.cmd \1.3\Patches\Patch3\GeneratedScripts\%1\FullInstall.cmd
Edit this batch file to add additional patches in order, and it works.
|
|
Hey S.O Guys
I am currently trying to process a bunch of files with imagemagick using a batch file in windows, they are all numbered numerically as follows: image00 image01, image02, ..., image010, image011, ..., image0100, image0101
and so on, but when...
Started by Craig on
, 3 posts
by 3 people.
Answer Snippets (Read the full thread at stackoverflow):
You could rename the files....
( dir /b).
Then in your batch , do some thing like this
pseudocode :
for ...
You can probably create some more batch code to "sort" the numbers by order, however, since you can GNU sort (in coreutils ).
|
Ask your Facebook Friends
|
Hey,
I am generating a Windows batch file that might become quite large, say a few megabytes. I've searched on possible limits regarding the maximum file size and maximum length of a line in a batch file but couldn't find anything. Any practical experiences...
Answer Snippets (Read the full thread at stackoverflow):
I never had any", thousands of set....
Errors with batch files being too large, and some of those I created were several MBs in size if this is done right, filesize limit should be the filesize limit of the file system.
|
|
How can I call a batch file inside a nant script??? (Maybe having a target that calls the batch file).
Answer Snippets (Read the full thread at stackoverflow):
The tasks in nantcontrib ? I needed to smoosh some... .
At the official documentation as well :)
Before dropping to a batch file have you considered a batch file, but it turns out that nantcontrib has a concat task, for example.
|
|
I have a batch file which calls another batch file that exists in PATH directory (basically calling an executable with additional switches.)
: bar.bat: foo.bat file1.txt foo.bat file2.txt etc.
In foo.bat:
foo.exe -t -s %1
bar.bat executes the first command...
Started by Dani on
, 6 posts
by 6 people.
Answer Snippets (Read the full thread at serverfault):
That will also do a call instead of a chain is call these two batch files....
Another option and the name of the other batch file to process.
Answer, use exit /b in the CALL ed batch file if you need to return early.
|
|
Exact Duplicates: How to write a batch file to delete the files which are 5 days or older from a folder? write a batch file to delete 6 days older files from a folder write a batch file to delete 5 daya older files from a folder How do I create a batch...
Answer Snippets (Read the full thread at stackoverflow):
Batch can be surprisingly powerful but I don't think the kind of date manipulation you want.
|
|
Hi,
I can compress files or folders in Windows from GUI by right clicking and selecting "Send to .. Compressed (zip) file..".
Is it possible to do same in batch file?
Started by Harriv on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at serverfault):
Is easy to use and free! A command line example to compress a bunch of files with the bak extension to ZIP.
|
|
I'm writing a batch file that needs to delete all the files in a certain dir and all of it's subdirectories except those of a specific type.
How can I do this?
Started by Monster on
, 4 posts
by 4 people.
Answer Snippets (Read the full thread at stackoverflow):
Safest way is to copy all the files you do want.
Although it doesn't give you exactly what you are asking, I would say it's a good starting point .
Try researching here.
But only copies .java files.
|
|
How you can read a file (text or binary) from a batch file? There is a way to read it in a binary mode or text mode?
Started by lk on
, 5 posts
by 5 people.
Answer Snippets (Read the full thread at stackoverflow):
Also, you can parse ini files....
If you want to do anything much more complicated than of a text file with
FOR /F %i IN (file.txt) DO @echo %i
Type "help for" on the command prompt for more prompt.
For a string in a file use FindStr.
|