PC Review


Reply
Thread Tools Rate Thread

Batch file rename and copy

 
 
New Member
Join Date: Aug 2008
Location: West Columbia, SC
Posts: 3
 
      7th Aug 2008
Hello,

I've gone through the forums and I was able to get some help that way from previous threads. I've got a batch file that appends the year, month, and day on it. It then moves it to another folder after processing.

I need it to add the minutes and seconds on there as well, and I can't seem to get the right code for it.

Code:
 
 @Echo Off
 @For /F "tokens=2,3,4 delims=/ " %%A in ('Date /t') do @(
 Set Month=%%A
 Set Day=%%B
 Set Year=%%C
 Set All=%%C%%A%%B
 )
 @For %%a in ("*.tif") do copy %%a "C:\Testdate\%%~na_%All%.tif"
Also, I'm not sure if this is even possible with batch files but is there a way to incorporate a statement that checks the file name and then moves it to a different folder depending on if it contained specific characters? Like GE08-1234, I would want in one folder, and then HHI08-1234 in a different one.

Thank you very much for the help!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Batch File Rename? MikeG Windows XP Help 2 23rd Oct 2007 08:37 PM
Rename in a batch file =?Utf-8?B?c2ltb25j?= Windows XP General 1 18th Dec 2006 12:22 PM
batch file rename shank Microsoft Windows 2000 CMD Promt 4 14th Nov 2006 05:03 PM
Rename with Batch File =?Utf-8?B?QWxhc3RhaXI3OQ==?= Microsoft Windows 2000 1 11th Jul 2006 12:09 PM
Rename from batch file? Tom McDonald Freeware 19 5th Apr 2004 01:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:18 PM.