MSFN Forum: Truncating File Names in CMD - MSFN Forum

Jump to content



Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Truncating File Names in CMD Rate Topic: -----

#1 User is offline   RaynotRoy 

  • Newbie
  • Group: Members
  • Posts: 26
  • Joined: 16-March 05

Posted 30 April 2005 - 10:30 PM

Is there a way to remove letters from the beggining of a file name?


#2 User is offline   un4given1 

  • Elaborate Dreamer
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 1,796
  • Joined: 25-September 03

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:

%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...)

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users



All trademarks mentioned on this page are the property of their respective owners
Copyright © 2001 - 2011 msfn.org
Privacy Policy