Two part question:
(1) [175 pts]
In order to automate some tasks I have that require opening several Windows programs, I dumped them into a DOS batch file to open the programs.
This works relatively well, but some programs halt the execution of the batch file until they are closed. After I close them, then the batch file continues. This is fine for some things but not others. Besides, I can always add a pause if I want that function.
I've played around a bit and found that if I launch the program in a separate shell (via the start command) then all is well...unless the command requires parameters.
Q:
How do I create a batch file of windows commands that does not pause until the program closes.
For example, this is what I have, and it pauses after notepad and SecureCRT but the rest open as soon as SecureCRT closes. If I prepend "start" then the parameters are ignored and it simply launches a new blank DOS window.
Myfile.bat
-----------
@Rem Add text file to folder
cd "C:\SomePath\ADC"
Notepad "ADCLog_yyyymmdd.txt"
@Rem Open the SecureCRT window to start DMR
cd "C:\Program Files\SecureCRT3.3\"
SecureCRT.EXE /S "Run ADC"
@Rem Open the bulk folders
explorer "C:\SomePath\ADC"
@Rem Launch the edit tool
cd "C:\Program Files\SlickEdit\win"
start vs.exe
@Rem Launch the claim converter
cd "C:\SomePath\ADC"
adc_regtest.xlt
@Rem Launch the FTP tool
cd "C:\Program Files\GlobalSCAPE\CuteFTP 8 Professional"
start cuteftppro.exe
----------
(2) [75pts]
Is there a way that I can get the current system date (in yyyymmdd format) into a variable so I can add it to a batch command (specifically, to create a text file with the current date: xxxx_yyyymmdd.txt)
Currently I'm donig this:
Notepad xxxx_yyyymmdd.txt
but i'd like the actual date there.
--
If either of these is more complicated than a simple command, I'll up the points.
Start Free Trial