ShadowTek
New Member
- Reaction score
- 23
This regards code used in the Windows command line.
I know how to pull a substring out of a variable, but I don't know how
to get a substring out of a variable in a for loop.
When I try the following command...
...I get this:
But what I am trying to get is this:
What is wrong with this?
I know how to pull a substring out of a variable, but I don't know how
to get a substring out of a variable in a for loop.
When I try the following command...
Code:
for %G in (Input_Files\*) do echo %G:~12%
...I get this:
Code:
Input_Files\New Text Document.txt:~12%
But what I am trying to get is this:
Code:
New Text Document.txt
What is wrong with this?