Home / Microsoft / Microsoft DOS / Run wild cards (*) of an updated file from batch p
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] - (Bottom) Print
Author Topic: Run wild cards (*) of an updated file from batch p  (Read 2414 times)
ramses
Guest
« on: June 16, 2004, 07:28:56 PM »

Hi all,

I am going to run a batch program on every user PC:

The program syntax is as below:

@ECHO OFF
NET USE Q: \\AIRWALK\V NTVIRUS /USER:NTVIRUS /PERSISTENT:NO
CD\
c:
cd "\Documents and Settings\%username%\Desktop"
mkdir NewVirusUpdate
copy q:\*.exe c:\"Documents and Settings\%username%\Desktop\NewVirusUpdate"
CD\
C:
CD "\Documents and Settings\%username%\Desktop\NewVirusUpdate"
*i32.exe /Q REM The real name is 20040615-019-i32.exe
*x86.exe /Q REM The real name is 20040615-019-i32.exe
NET USE q: /delete /y

Problem:
1. The file is daily updated. For the next update the filename will be 20040616-019-i32.exe and 20040616-019.x86.exe.
2. I cannot run the program since DOS cannot recognize *i32.exe and *.x86.exe. as it internal/external command.
3. I have to type the program name exactly.

How would I use the wild card to run such program automatically since the name of the program is daily updated?
IP logged
Fred
Guest
« Reply #1 on: June 17, 2004, 08:02:33 AM »

You could try this:
Create a backup folder
Get your batch file to copy your new *i32.exe & *x86.exe files to backup folder
Then get it to rename *.i32.exe e.g. Filei32.exe
and *x86.exe to filex86.exe
Use the new file names to run your program.
The start of the batch may need to contain a command to delete filei32.exe & filex86.exe if they exist so there won't be problems with the rename section.
IP logged
Pages: [1] - (Top) Print 
Home / Microsoft / Microsoft DOS / Run wild cards (*) of an updated file from batch p « previous next »
 


Login with username, password and session length

Old Forum Search | Forum Rules
Copyright © 2010 Computer Hope ® All rights reserved.
Powered by SMF 2.0 RC3 | SMF © 2006–2010, Simple Machines LLC
Page created in 0.088 seconds with 18 queries.