DOS Command does interpret some special characters before executing a command, such as percent sign ( % ), and the redirection symbols ( < | > ).
Windows 95/98/NT/2000/XP/2003/2008/7/etc. and OS/2 systems, also interpret double quotes ( " ) and ampersands ( & ), as revealed within the Conditional Execution page.
In batch files (.bat files), the percent sign (%) should be replaced by a double percent sign ( %% ). However, when you run a command line in DOS Window or CMD Window directly, you should use a single percent sign, for example,
for %F in (D:\temp\*.pdf) do echo "%F" "%~nF.pdf"
If you put above command line into a .bat file, you should change it to following,
for %%F in (D:\temp\*.pdf) do echo "%%F" "%%~nF.pdf"
In Windows 95/98/NT/2000/XP/2003/2008/7/etc., and OS/2 systems, the redirection symbols may be used by putting them between double quotes ( ">" ). Even so, the quotes can be passed to the command line as well, this behaviour is not like the double percent sign (%%).
Windows and OS/2 Systems are allow using carets ( ^ ) to escape some special characters. Even linefeeds may be escaped this way, as is shown in the Useless Tips page.
If you intend to "nest" commands with escaped characters, you may need to escape the escape character itself too, this will make it difficulty to read or debug your batch files.
Random Posts
Related posts:
How to convert pcl to bmp via command line?
How to convert prn to pxl?
How to convert prn to pxl via command line?
Convert prn to pxl and rotate page via command line?
How to convert PRN to PS and set page orientation?
How to convert PRN to bitmap and set color depth?
Is there a way to convert EMF to PDF?
How to update logo in PDF in batch?