JJ
2012-06-01 22:12:24 UTC
Hello,
I'm trying to pass file path as a parameter to a console program. e.g.:
C:\PROG.EXE "C:\The File"
This command line is executed from another program (call it PROG2).
Since I need to see the result, I use 4NT and PAUSE command like so:
C:\4NT\4NT.EXE /C C:\PROG.EXE "C:\The File" & PAUSE
It works most of the time, but not if the file contains "%" (percent)
character(s). e.g.:
C:\4NT\4NT.EXE /C C:\PROG.EXE "C:\File%With%Percent" & PAUSE
The result is that 4NT execute the program as:
C:\PROG.EXE "C:\FilePercent"
instead of:
C:\PROG.EXE "C:\File%With%Percent"
Strange thing is, it works OK if I use CMD instead of 4NT.
I have various kind of file names. Some even contains "&" characters and
unicodes, so my current full command is like:
C:\4NT\4NT.EXE /U /C SETDOS/C¬ %+ C:\PROG.EXE $file$ %+ PAUSE
The above "$file$" is used by PROG2 to substitute file path.
So how can I make 4NT works like CMD in this specific case?
Thank you in advance.
I'm trying to pass file path as a parameter to a console program. e.g.:
C:\PROG.EXE "C:\The File"
This command line is executed from another program (call it PROG2).
Since I need to see the result, I use 4NT and PAUSE command like so:
C:\4NT\4NT.EXE /C C:\PROG.EXE "C:\The File" & PAUSE
It works most of the time, but not if the file contains "%" (percent)
character(s). e.g.:
C:\4NT\4NT.EXE /C C:\PROG.EXE "C:\File%With%Percent" & PAUSE
The result is that 4NT execute the program as:
C:\PROG.EXE "C:\FilePercent"
instead of:
C:\PROG.EXE "C:\File%With%Percent"
Strange thing is, it works OK if I use CMD instead of 4NT.
I have various kind of file names. Some even contains "&" characters and
unicodes, so my current full command is like:
C:\4NT\4NT.EXE /U /C SETDOS/C¬ %+ C:\PROG.EXE $file$ %+ PAUSE
The above "$file$" is used by PROG2 to substitute file path.
So how can I make 4NT works like CMD in this specific case?
Thank you in advance.