Computing.Net > Forums > Programming > Batch file xcopy based on date

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Click here to start participating now! Also, check out the New User Guide.

Batch file xcopy based on date

Reply to Message Icon

Name: jumunk
Date: August 27, 2007 at 08:05:23 Pacific
OS: xp
CPU/Ram: refge
Product: ert
Comment:

I was wondering if anyone knows a way to write a batch file that copies files based on a date specified NOT including the files newer than the specified date. thanks for the help!



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: August 28, 2007 at 03:35:41 Pacific
Reply:

@echo off
setLocal EnableDelayedExpansion

if %1'==' echo what date? && goto :eof

dir /a-d | find "%1" > copylist

for /f "tokens=4 delims= " %%a in (copylist) do (
xcopy %%a s:\some\place\
)



=====================================
If at first you don't succeed, you're about average.

M2



0
Reply to Message Icon

Related Posts

See More


array scan awk program



Post Locked

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


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Batch file xcopy based on date

Batch File Exe Program on Date www.computing.net/answers/programming/batch-file-exe-program-on-date/15176.html

Deleting files based on Date www.computing.net/answers/programming/deleting-files-based-on-date/15215.html

Batch file rename based on data in file www.computing.net/answers/programming/batch-file-rename-based-on-data-in-file/19301.html