Page 1 of 1

copy files and folders by date modified

Posted: 17 Jul 2010 03:22
by karzer
Hi,

I have the existing thousands file folder according to their modified dates should be how we can make flour, I tried to do with xcopy and robocopy but could not be set to change the date, I wonder how we can do ?

Code: Select all

"robocopy" "xcopy" "xxcopy" ?



Image
Image
Image

Re: copy files and folders by date modified

Posted: 17 Jul 2010 05:23
by aGerman
Hmm, it's not that easy for me to understand. What means "how we can make flour"?

OK, tell me if I'm right:
You want to move your images depending on their "date last modified". The format of the new folder names is DDMMYYYY. The default date format of your system settings is DD.MM.YYYY.

Try this:

Code: Select all

@echo off &setlocal
pushd "D:\resim foto\Üni Etkinlikleri"
for %%a in (*.jpg) do (
  for /f "tokens=1-3 delims=. " %%b in ("%%~ta") do (
    md %%b%%c%%d 2>nul
    move "%%a" "%%b%%c%%d\%%a"
  )
)
popd
pause


Maybe I misspelled the folder name. You should check it.

Regards
aGerman

Re: copy files and folders by date modified

Posted: 17 Jul 2010 16:24
by karzer
Thank you very much ...


We solved the problem