Wow, it works!
I never before understood the difference between arguments and variables in a DOS script, and why the behavior of the BAT file was so different than that of a compiled program.
Thanks, guys!
Search found 2 matches
- 22 Nov 2010 16:55
- Forum: DOS Batch Forum
- Topic: How to manipulate a "%%x"- type string read from a file?
- Replies: 6
- Views: 7414
- 22 Nov 2010 12:15
- Forum: DOS Batch Forum
- Topic: How to manipulate a "%%x"- type string read from a file?
- Replies: 6
- Views: 7414
How to manipulate a "%%x"- type string read from a file?
I'm reading strings from a file using a simple batch file: echo off for /f %%x in (%1) do ( echo %%x ) What I actually want to do is extract the last character of the string, using a substring expression in the form "%x:~-1%" I can't get this to work with the "%%x" variable in th...