While using " in my command string, double quotes gets interpreted.
$printername="Intouch Printer"
print($printername)
$command ='D:\spool12\spool.exe '+ $_.FullName + ' "'+ $printername+'"'
print($command)
iex $command
I am getting this while I am executing this code:
> D:\spool12\spool.exe D:\Spool Files-20170113T061110Z\Spool Files\Un
> Readable\creame and fudge\00143.SPL IntouchPrinter
Rather I want it to be like:
> D:\spool12\spool.exe D:\Spool Files-20170113T061110Z\Spool Files\Un
> Readable\creame and fudge\00143.SPL "IntouchPrinter"
"with a backtick `