Microsoft
Software
Hardware
Network
Question : Adding todays date to file names
Is there an easy way to add todays date to file names using .CMD
I want to copy all the files in a folder and create copies with today's date added to the file name
The folder would contain
test.txt
test2.txt
and after running the .cmd file the folder would contain
test.txt
test2.txt
test10072008.txt
test10072008.txt
thanks for the help
Answer : Adding todays date to file names
copy & paste this code to CMD file
1: 2:
@echo off for %%i in (*.txt) do (copy %%i %%~ni%date:~-10,2%%date:~-7,2%%date:~-4,4%.txt)
Open in New Window
Select All
Random Solutions
Re-enable the password expiration notice banner in exchange OWA
Problem printing 2 pages per sheet for mulfiple worksheets
Multiple domains and SEO
Default page for people to get to their email
How to calculate MAX or MIN within a form
IE^ and IE7 Registry Settings
Linked Server in SQL 2005 to Advantage Database Server 8.0
Can you submit a form and close the window without connection reset by peer error?
The Root Password has been forgotten. Can we recover?
can't move icons