Technical support and scripting issues
Moderators: Dorian (MJT support), JRL
-
hip2b2
- Newbie
- Posts: 9
- Joined: Thu Nov 05, 2009 4:41 am
Post
by hip2b2 » Mon Dec 12, 2011 4:01 pm
I am trying to build what is a simple macro but am so far unsuccesful.
My objective is to:
1 - Test for file (%Path%\Folder_n\data.csv)
2 - If file exists then a run VBS script AND wait 60 seconds before continuing
3 - If file does not exist then do nothing and move on to next If routine.
Code: Select all
//Variables
//Set Common Path
Let>Path=C:\WorkFolder
//Set Wait Time
Let>WaitTime=60
IfFileExists>%Path%\Folder_1\data.csv
run>"C:\Program Files\Folder\RunProject1.vbs"
Wait>WaitTime
Else
//DO nothing
EndIf
IfFileExists>%Path%\Folder_2\data.csv
run>"C:\Program Files\Folder\RunProject2.vbs"
Wait>WaitTime
Else
//DO nothing
EndIf
Any help will be appreciated.
Many Thanks in advance.
hip
-
Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
-
Contact:
Post
by Marcus Tettmar » Mon Dec 12, 2011 4:46 pm
You will need to use ExecuteFile not Run:
ExecuteFile>C:\Program Files\Folder\RunProject2.vbs
Aside from that which part isn't working?
-
hip2b2
- Newbie
- Posts: 9
- Joined: Thu Nov 05, 2009 4:41 am
Post
by hip2b2 » Mon Dec 12, 2011 5:32 pm
I thought that the "Wait>WaitTime" was not running as part of "IFFileExists" = True, but it appears once again I was wrong.
Thanks for the help.
h