Is there a way to remove letters from the beggining of a file name?
Page 1 of 1
Truncating File Names in CMD
#2
Posted 01 May 2005 - 12:49 AM
If you wish to remove so many letter then yes... if you wish to remove certain letters, no... well, not easily. Please elaborate more.
You set a variable with the information you want to work with...
Then you can use the following:
First one will remove the first 3 characters
Second one will remove the first 5 characters and only display the next 6 characters
Third one will remove the first 2 characters and display everything but the last 7 characters
Forth one will be the last 10 characters but only display the first 3 characters of that set
Fifth one will be the last 15 characters but only display the last 6 characters of that set (kinda worthless, but works nonetheless...)
You set a variable with the information you want to work with...
Then you can use the following:
%variable:~3% %variable:~5,6% %variable:~2,-7% %variable:~-10,3% %variable:~-15,-6%
First one will remove the first 3 characters
Second one will remove the first 5 characters and only display the next 6 characters
Third one will remove the first 2 characters and display everything but the last 7 characters
Forth one will be the last 10 characters but only display the first 3 characters of that set
Fifth one will be the last 15 characters but only display the last 6 characters of that set (kinda worthless, but works nonetheless...)
- ← Having some trouble installing hotfixes for W2k.
- Unattended Windows 2000/XP/2003
- Problem with View →
Share this topic:
Page 1 of 1



Help
Back to top









