Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Run wild cards (*) of an updated file from batch p  (Read 8363 times)

0 Members and 1 Guest are viewing this topic.

ramses

  • Guest
Run wild cards (*) of an updated file from batch p
« 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?

Fred

  • Guest
Re: Run wild cards (*) of an updated file from bat
« 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.