MS-DOS

Moderators: blip
Number of threads: 389
Number of posts: 904

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Retain DateString during filename rename... Posted by Barrj2007 on 16 May 2011 at 2:29 PM
Given a daily production of files named:

productNew_2011May20.txt
productMod_2011May20.txt
productExp_2011May20.txt
(where the product* string remains constant, but date changes)

Can anyone suggest a 'batchable' way in DOS to rename the files to:
1_2011May20.txt
2_2011May20.txt
3_2011May20.txt

I am having a hard time retaining the last 9 characters in my copy/rename command.

Or, alternatively, is there a way to invoke the YYYYMONDD as a part of my filename from scratch? Thanks.





 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.