Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi,
I need a batch script to copy the today modified sub-folders of a folder to a new folder.
Ex:
Folder "f:/test1" is having total 5 sub-folders and I want to copy only today created/modified sub-folders from "f:/test1" to "f:/test2" folder.
I have the following script whis is only copying the today modified files but not the folders.
Please help to resolve this issue.
--------------------------------
::Copy Files Made Or Modified Today
@echo off
setlocal
set source=f:\test12
set dest=f:\test23
pushd "%source%"
set t=%date:~4%
for /f %%a in ('dir /b /a-d /o-d') do call :PROCESS "%%a"
goto :eof
popd:PROCESS
echo %date:~4%
for /f %%j in ('echo %~t1') do set d=%%j
if "%d%"=="%t%" copy "%1" "%dest%"
goto :eof---------------------------------

![]() |
Clear screen in java Text...
|
copy files but compare t...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |