Copy files created since?

J

James Goodman

We have a folder which contains several hundred sub-folders. Each of these
sub-folders contain hundreds of image (jpg) files.

Most of these files do not change, <100 per week. At the moment, I am
copying every file to a DVD, before copying them off the CD onto the target
computer (disconnected). Because I am copying every image, I have to copy
approx 1GB of images which takes quite a while.

I wrote a VB function which compares files on the DVD to the target
computer, & if different copies them. This makes the target copy fairly
fast, but copying 1GB of images onto a DVD in the first place is a waste of
time.

I therefore want to copy only files created in the last n days, whilst
preserving the folder structure. If I can only copy the the new files, I
could reduce the copy size to approx 50MB!

Any suggestions?
 
D

Dave Patrick

You can use;
xcopy /d:m-d-y

--
Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| We have a folder which contains several hundred sub-folders. Each of these
| sub-folders contain hundreds of image (jpg) files.
|
| Most of these files do not change, <100 per week. At the moment, I am
| copying every file to a DVD, before copying them off the CD onto the
target
| computer (disconnected). Because I am copying every image, I have to copy
| approx 1GB of images which takes quite a while.
|
| I wrote a VB function which compares files on the DVD to the target
| computer, & if different copies them. This makes the target copy fairly
| fast, but copying 1GB of images onto a DVD in the first place is a waste
of
| time.
|
| I therefore want to copy only files created in the last n days, whilst
| preserving the folder structure. If I can only copy the the new files, I
| could reduce the copy size to approx 50MB!
|
| Any suggestions?
|
| --
| Cheers,
|
| James Goodman
|
|
 
J

James Goodman

Unfortunately that uses the modification date, rather than the creation
date. Because these images are coming from digital cameras (with incorrect
dates set most of the time!), the modification date is, more often than not
incorrect. The creation date is reliable, as it is the date the file was
copied onto our server...
 
J

Jerold Schulman

Unfortunately that uses the modification date, rather than the creation
date. Because these images are coming from digital cameras (with incorrect
dates set most of the time!), the modification date is, more often than not
incorrect. The creation date is reliable, as it is the date the file was
copied onto our server...

Use a technique like:

@echo off
setlocal
for /f "Tokens=*" %%a in ('dir c:\zipnew\*.* /b /a-d /s /a') do (
for /f "Tokens=1-3* Delims=/ " %%b in ('dir "%%a" /TC ^|find /I "%%~nxa"') do (
if "%%d%%b%%c" GTR "20041016" copy "%%a" "D:%%~Pa*.*"
)
)
endlocal

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
J

Jerold Schulman

Unfortunately that uses the modification date, rather than the creation
date. Because these images are coming from digital cameras (with incorrect
dates set most of the time!), the modification date is, more often than not
incorrect. The creation date is reliable, as it is the date the file was
copied onto our server...

Use a technique like:

@echo off
setlocal
for /f "Tokens=*" %%a in ('dir c:\zipnew\*.* /b /a-d /s /a') do (
for /f "Tokens=1-3* Delims=/ " %%b in ('dir "%%a" /TC ^|find /I "%%~nxa"') do (
if "%%d%%b%%c" GTR "20041016" copy "%%a" "D:%%~Pa*.*"
)
)
endlocal

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
J

Jerold Schulman

Unfortunately that uses the modification date, rather than the creation
date. Because these images are coming from digital cameras (with incorrect
dates set most of the time!), the modification date is, more often than not
incorrect. The creation date is reliable, as it is the date the file was
copied onto our server...

Use a technique like:

@echo off
setlocal
for /f "Tokens=*" %%a in ('dir c:\zipnew\*.* /b /a-d /s /a') do (
for /f "Tokens=1-3* Delims=/ " %%b in ('dir "%%a" /TC ^|find /I "%%~nxa"') do (
if "%%d%%b%%c" GTR "20041016" copy "%%a" "D:%%~Pa*.*"
)
)
endlocal

Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top