Computing.Net > Forums > Programming > TRim file name in DOS

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

TRim file name in DOS

Reply to Message Icon

Name: aquiyar
Date: February 20, 2009 at 05:39:43 Pacific
OS: Windows XP
Subcategory: Batch
Comment:

I wanto to rename abc123.txt,abc234.txt,abc345.txt to 123.txt,234.txt,345.txt respectively. please help me out..



Sponsored Link
Ads by Google

Response Number 1
Name: IVO
Date: February 20, 2009 at 06:12:41 Pacific
Reply:

Stated there is no DOS in Windows XP, the following NT batch script does the job

@echo off & setlocal EnableDelayedExpansion
for %%j in (abc???.txt) do (
  set file=%%~nxj
  ren %%j !file:~3!
)
:: End_Of_Batch


0

Response Number 2
Name: aquiyar
Date: February 22, 2009 at 22:50:42 Pacific
Reply:

Thank you...
Now I want to ftp those files. I cant use copy because U have to move it to other system which is not in share access.
I have to use put command. But I need to do it in a single shot. Please help me


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: TRim file name in DOS

Compare file names in batch file www.computing.net/answers/programming/compare-file-names-in-batch-file/16616.html

batch file name(s) in memory? www.computing.net/answers/programming/batch-file-names-in-memory/15656.html

VB file name parser and sorter www.computing.net/answers/programming/vb-file-name-parser-and-sorter/15622.html