I need to call a batch file for execution through the perl script.pz help
How to Call a Batch file for execution from a perl script
Collapse
X
-
Tags: None
-
Originally posted by RaviRajhulkI need to call a batch file for execution through the perl script.pz help
[CODE=text]
system("start C:\\Temp\\mybat chfile.bat"); # run the batch file
sleep 15; ### wait 15s for execution before proceeding
[/CODE] -
Comment
-
Hello, nithinpes i am trying to run a batch file which is located in Documents and Settings folder. I get the error as windows can not find the path "c:Document s\. How to fix this error?Comment
-
Thank you nithinpes. I have small doubt. Should the batch be in C folder only to be executed? Cos I have my batch file in D drive. When i try to run batch file individually, it runs and gives me corresponding output. But, when I try to run from perl script, it wont run. Also, I wont get any error message. What might be the problem?Comment
-
aksindia
when the path contains spaces, replace the folder names with their windows names.
To get windows names of the folders, just use command dir /x.
it will solve spaces problem.Comment
Comment