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
executing commands after telnetting to a server on listening defined port
OUTLOOK 2003 RETURNS THIS ERROR MESSAGE WHEN ATTACHING A PDF FILE - MICROSOFT OFFICE WORD, THE OPERATION FAILED
Missing or Corrupted Command Com Trying to Boot From A Ghost Floppy
How to use trusted connection: CR 8.5, VB6, SQL Server
Textcopy with trusted connection and Windows authentication
Cisco PIX 501 as PPTP Client?
Sound Card
Database inconsistent in Exchange Server 2000
new windows mobile 6 device can't sync to exchange wireless or through usb desktop
Packet sniffing, 2851, ASA 5520