Link to home
Start Free TrialLog in
Avatar of Francisco
FranciscoFlag for Japan

asked on

vbs script to run external executable and move file

Hello,

Would you please help me?

I need batch file that will run on Windows XP PC, but not with command prompt but background.
I have no single experience on vbs but I learned from Experts log that vbs can run in background....

What I need to do....
1) check file *yyyymmdd.txt exist or not, if not, exit  (yyyymmdd is today's date)
2) run external executable (written in C++) to this particular file with passing the file name as valuable.
3) check if directory called "Archive" exists or not, if not, create the directory
4) move the *yyyymmdd.txt into Archive


Would somebody help me on this?
Avatar of cj_1969
cj_1969
Flag of United States of America image

Being a vb script you have 2 ways to run this ... cscript or wscript
cscript runs it ina command-line type window and wscript will run it in a windows environment.
BUT from your question, I get the feeling that you want cscript, you just don't want to have to run it manually, you want it to execute and stay running, without being on the desktop ... if so, then you probably want to look at running it as a service.

Check out this page ... it should have all the info you need for this ... http://support.microsoft.com/kb/q137890/
ASKER CERTIFIED SOLUTION
Avatar of cj_1969
cj_1969
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Francisco

ASKER

Hi, cj 1969,

Thank you very much, it works very well!!!!!

:-D appreciated!!!

sleepingluke