in reply to How to pass a folder name to Windows external commands?
my @report = qx(robocopy /njh /nfl /ndl /np /l /s "$testpath" "x:\\nodir");
See my node Calling External Commands More Safely. In this case, I might recommend IPC::Run3, which on Windows uses Win32::ShellQuote automatically.
Edits: Added mention of Win32::ShellQuote and quoted the node.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to pass a folder name to Windows external commands?
by haukex (Archbishop) on Mar 04, 2022 at 18:45 UTC | |
by freonpsandoz (Beadle) on Mar 08, 2022 at 11:41 UTC | |
by haukex (Archbishop) on Mar 08, 2022 at 18:37 UTC |