Notices
Computer & Technology Related Post here for help and discussion of computing and related technology. Internet, TVs, phones, consoles, computers, tablets and any other gadgets.

Batch file wizardry help needed

Thread Tools
 
Search this Thread
 
Old 27 October 2006, 11:09 AM
  #1  
Stueyb
Scooby Regular
Thread Starter
 
Stueyb's Avatar
 
Join Date: May 2002
Posts: 1,893
Likes: 0
Received 0 Likes on 0 Posts
Default Batch file wizardry help needed

I know its probabily trivial for you batch file gurus, but I have googled for some batch files to allow me to move all the files, bar the last 30 days, from a folder to a network share.

Is it easy and does anyone have the code ?


cheers


Stuart
Old 27 October 2006, 01:13 PM
  #2  
HankScorpio
Scooby Regular
 
HankScorpio's Avatar
 
Join Date: Feb 2004
Posts: 5,848
Likes: 0
Received 0 Likes on 0 Posts
Default

Use xcopy.

something like:

xcopy {source} {destination} /e /v /z /d:m-d-y

depending on what you actually want to do.
Old 27 October 2006, 01:29 PM
  #3  
ChefDude
Scooby Regular
 
ChefDude's Avatar
 
Join Date: Aug 2005
Posts: 4,290
Likes: 0
Received 0 Likes on 0 Posts
Default

that would only copy the files newer than that date
Old 27 October 2006, 01:40 PM
  #4  
HankScorpio
Scooby Regular
 
HankScorpio's Avatar
 
Join Date: Feb 2004
Posts: 5,848
Likes: 0
Received 0 Likes on 0 Posts
Default

Yep, misread the OP

Use a robocopy with the /minage switch or use FORFILES with a -d and FOR /F to pass the resulting file list to the copy command as variables.
Old 27 October 2006, 01:53 PM
  #5  
HankScorpio
Scooby Regular
 
HankScorpio's Avatar
 
Join Date: Feb 2004
Posts: 5,848
Likes: 0
Received 0 Likes on 0 Posts
Default

Oops. just reread for the third time.
Pass the file list to a move command rather than copy.
Related Topics
Thread
Thread Starter
Forum
Replies
Last Post
taylor85
Wanted
2
13 September 2015 04:57 PM
AzzDSM
Engine Management and ECU Remapping
4
13 September 2015 03:59 PM
robbie1988
Wanted
2
13 September 2015 09:25 AM
riiidaa
ScoobyNet General
1
12 September 2015 11:52 AM
Scooby-Doo 2
Wheels And Tyres For Sale
1
09 September 2015 06:51 PM



Quick Reply: Batch file wizardry help needed



All times are GMT +1. The time now is 10:41 AM.