My Assistant
![]()
Custom Search
|
![]() ![]() |
![]() |
![]() Post#1 | |
![]() Posts: 637 Joined: 3-June 11 From: Miami, FL ![]() | Hi Guys - I'm running a php script as follow: CODE $obj = NEW COM('WScript.Shell'); // if (is_object($obj)) { // $cmd = 'wscript "C:\dir\subdir\move_file.vbs"'; // $obj->Run('cmd /C '.$cmd, 0, $wait); // } else { // echo 'can not create wshell object'; // } // $obj = null; // The vbs simply creates a copy of the a file in another location. Works perfectly when I hard code the file location and the destination folder. But I can't make it work passing the source and destination as parameters Bottom line, How to build my $cmd with the parameters?! I tried the following but no luck CODE $cmd = 'wscript ""C:\dir\subdir\move_file.vbs '; $cmd = $cmd."/From:".Chr(34).Chr(34)."$fFile".Chr(34).Chr(34)." "; $cmd = $cmd."/To:".Chr(34).Chr(34)."$tFile".Chr(34).Chr(34).Chr(34).Chr(34); Thanks a lot for the help SD |
![]()
Custom Search
|
![]() | Search Top Lo-Fi | 10th December 2019 - 12:33 AM |