Solved How to rename files with their modified date?

August 27, 2012 at 18:36:39
Specs: Windows 2003
I would like to rename a lot of files with their modified date with the use of a batchfiles.

Thanks!!!


See More: How to rename files with their modified date?

Report •


#1
August 28, 2012 at 01:13:09
✔ Best Answer
Post the output of this:

:: ===== script starts here ===============
:: compare dates
:: dcomp.bat 2012-08-19 15:30:56.79
@echo off > newfile & setLocal enableDELAYedeXpansioN

for /f "tokens=* delims= " %%a in ('dir/b/od/a-d') do (
echo.%%~Ta %%a
)
::====== script ends here =================


====================================
Life is too important to be taken seriously.

M2


Report •

#2
August 28, 2012 at 10:22:56
I certaintly did someting wrong as nothing happen, do I have to input someting in the batchfile? or only copy paste in a .txt and change to .bat

Report •

#3
August 28, 2012 at 19:31:14
@notageek: I believe M2 wants to determine your computer's date format. All you need to do is run the script he gave (save it as .bat) in a non-empty directory, then post a couple of lines of the output (dates+times).

Report •

Related Solutions

#4
August 29, 2012 at 05:52:56
@M2 & @nbrane: Thanks for your generous time and prompt response, I am impress.

Once I run the batchfile, it generate a new file with nothing in it???


Report •

#5
August 29, 2012 at 21:11:21
@echo off > newfile & setLocal enableDELAYedeXpansioN

for /f "tokens=* delims= " %%a in ('dir/b/od/a-d') do (
>> newfile echo.%%~Ta %%a
)
::end

post content of "newfile"


Report •

#6
August 30, 2012 at 05:06:19
@nbrane & @M2

This is the content of "newfile"

2012-08-24 09:24 AM Afghanistan Governance Factiva - 23 Aug 2012.pdf
2012-08-30 08:03 AM renamer4.bat
2012-08-30 08:03 AM newfile


Report •

Ask Question