Computing.Net > Forums > Disk Operating System > Rename the file name to %Date%-1

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.

Rename the file name to %Date%-1

Reply to Message Icon

Name: charles_cp
Date: October 22, 2003 at 04:10:41 Pacific
OS: Windows 2000
CPU/Ram: 800
Comment:

My Windows 2000 server will receive a I001.txt everyday. I want to rename the file name daily. Thus, I had write a batch file like this:
for /f "tokens=1-3 delims=/ " %%a in ('DATE /T') do set Date=%%a%%b%%c
copy I001.txt I001%date%.txt /b/y

But the text file will receive at 11:59pm. When I run the batch file. The file name is not the receive day.
How to set the %data% can less 1 day?



Sponsored Link
Ads by Google

Response Number 1
Name: borelli35
Date: October 22, 2003 at 22:09:24 Pacific
Reply:

In your questions you typed %data%. Just to be clear, do you mean %date%?

borelli35


0
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 Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Rename the file name to %Date%-1

Convert file name to 8.3 length www.computing.net/answers/dos/convert-file-name-to-83-length/12841.html

Batch File - Create new File Name www.computing.net/answers/dos/batch-file-create-new-file-name/11927.html

rename file name in todays date.txt www.computing.net/answers/dos/rename-file-name-in-todays-datetxt/14115.html