in reply to system command can't spawn cmd.exe
Are you sure that your file is really there?
Writing Windows path names correctly can be tricky sometimes. Try this one:
#!/usr/bin/perl -w use strict; my $prog = "c:\\program files\\agent\\agent.bat"; if (-f $prog) # does it exist? { system("cmd.exe", "/C", $prog); } else # if not, let's see its name after escaping "\"s { warn "batch file ($prog) not found!\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: system command can't spawn cmd.exe
by cormanaz (Deacon) on Jan 12, 2005 at 14:31 UTC |