That's completely fine. I have been using them both.
I am writing the whole script within a Heredoc block and this is giving me a hard time
Code: Select all
// Build our command using a HEREDOC to make it legible.
$cmd = <<<CMD
"C:\Program Files\winrar\winrar.exe" X -ad -- "$item" "<curpath>"
CMD;
As Heredoc cannot be nested, I tried various permutations but got stuck again.
I have tried the below options
Run """$WinRAR"" X -ad ""$item"" ""<curpath>""", "<curpath>", 0 /*continue*/, 2 /*minimize*/;
Run ""$WinRAR"" X -ad ""$item"" ""<curpath>"", "<curpath>", 0 /*continue*/, 2 /*minimize*/;
$cmd='"C:\Program Files\winrar\winrar.exe" X -ad -- "$item" "<curpath>"' ;
Run $cmd, "<curpath>", 0 /*continue*/, 2 /*minimize*/;
$cmd="""C:\Program Files\winrar\winrar.exe"" X -ad -- ""$item"" ""<curpath>""' ;
Run $cmd, "<curpath>", 0 /*continue*/, 2 /*minimize*/;
It is failing at resolving $item. It says the file is corrupt. Can you tell me where I am erring.