Answered by:
VBS that used to run, does not run anymore when called from CMD file

Question
-
CMD file:
@echo %~dp0
FORFILES /m %1.d0* /c "cmd /c MetaSuite_OpenFile.vbs @file"
@echo ****%1.d0* **** ****
result:
C:\Users\red\DOCUME~1\METASU~1\GENFUJ~1\TMP\;
C:\Users\red\Documents\Metasuite\GENFujitsu_Windows\TMP>FORFILES /m azert.d0* /c "cmd /c MetaSuite_OpenFile.vbs @file" ;
****azert.d0* **** ****;VBS file is in same directory:
C:\Users\red\Documents\Metasuite\GenFujitsu_Windows\TMP
runs fine from command prompt
and used to run!!
I'm running windows 7
thank you for your help!
- Moved by Bill_Stewart Friday, November 28, 2014 5:08 PM Unanswerable drive-by question
Saturday, October 18, 2014 10:00 AM
Answers
-
The issue seems to be trying to mix batch meta commands with forfiles utility commands. Yu cannot do that. Please read the help for forfiles.
FORFILES /?
look at all of the examples.
¯\_(ツ)_/¯
Saturday, October 18, 2014 2:07 PM
All replies
-
Why use a hybrid batch/VBS approach when you could create a nice and clean solution by putting the file selection code into MetaSuite_OpenFile.vbs?Saturday, October 18, 2014 12:41 PM
-
Likely because it is a third party product.
Forfiles is a utility and not a script. Placing it in a batch file does not make it a script issue.
The problem is in the VBS and how it is being used. The OP must contact the vendor of the VBS to determine what the output is trying to indicate.
¯\_(ツ)_/¯
Saturday, October 18, 2014 1:57 PM -
This makes little sense: %1.d0*
¯\_(ツ)_/¯
Saturday, October 18, 2014 2:04 PM -
The issue seems to be trying to mix batch meta commands with forfiles utility commands. Yu cannot do that. Please read the help for forfiles.
FORFILES /?
look at all of the examples.
¯\_(ツ)_/¯
Saturday, October 18, 2014 2:07 PM