in reply to System substitution

I find problems with this all the time.. I have had to resort to the following ...

use win32; $path = "C:\\Test Path\\test file.bat"; $parameter = $ARGV[0]; unless ($bat_file = Win32::GetShortPathName($path)) { print "$bat_file - Path Problems in Setup for $path: $^E\n"); exit(); } $bat_file =~s /\\/\//g; print "$bat_file\n"; system("$bat_file $parameter");
I have tested this code and it does take the command line param from the .pl script and place it after the shortened path with the bat file.

I was only echoing a hello %1 in the bat file and from the command line running 214402.pl AcidHawk which resulted in the bat file echoing Hello AcidHawk..

Update: Hmm... let me relook at this question..

You can use the Win32::GetshortPathName for both your $ENV{TYPE} as well as your $new_debug_log. The code above can still apply though instead of using $ARGV[0] use your $new_debug_log var that you have got the short path name for..

-----
Of all the things I've lost in my life, its my mind I miss the most.