Want to copy and archive certain files every day?

Closed
Kilm - May 29, 2015 at 07:40 AM
 Blocked Profile - Jun 4, 2015 at 09:43 PM
Hi folks,

I need something that will let me, with as few clicks as possible, copy and then archive a list of specific files from different locations to different locations every day.

All files need to have the date added - some are the current date, some are the previous days date.

I'm on XP but we're migrating to 8.1 and I can't find any programs that can do this (or that I'd be allowed to install) so not sure if there's a simpler way around it.

I spend far too long every day dealing with archiving documents. Any help would be greatly appreciated!
Related:

2 responses

Blocked Profile
May 29, 2015 at 04:56 PM
Batch files (those files ending in .bat) still run in 8.1. Look up writing batch files for this type of services.

You can then schedule the batch file to run everyday at a certain time, or trigger every 4 hours or whatever through system scheduler.

you can start with this:

xcopy /s c:\source d:\target


You'd probably want to tweak a few things; options to change the way it works:

/s/e - recursive copy, including copying empty directories.
/v - add this to verify the copy against the original. slower, but for the paranoid.
/h - copy system and hidden files.
/k - copy read-only attributes along with files. otherwise, all files become read-write.
/x - if you care about permissions, you might want /o or /x.
/y - don't prompt before overwriting existing files.
/z - This marks the file with indicators if copying fails, it knows it left off.


So you open notepad, write the code. save it as all files types with .bat on the end, then run it as administrator.

I have said it once, I will say it again. IT!
1
Hi mate,

That's great, thanks.

I've got it working now, and it's fine for the most part with files being renamed to the current date. Some files however are the previous days information and I'm just having issues trying to figure out how to get a file to be renamed to the previous date.

I've searched and seen some examples of getting the previous days date, but it's well over my head.

Any ideas?
0
Blocked Profile
Jun 3, 2015 at 04:56 PM
Load the date as a Julian date integer, and subract one from from it.
0
Kilm > Blocked Profile
Jun 4, 2015 at 02:40 AM
Yep, you lost me at Julian and I got back on board at 'it'. :)

I've never done batch before, or any form of programming, so stumbling my way through this. If you're able to expand on your answer, that'd be great, but don't worry if you don't have the time!

Cheers,

K
0
Blocked Profile
Jun 4, 2015 at 09:43 PM
The Julian date is the integer equivalent of the day of year. So Jan 1st, is Julian day 1. Dec 31 is Julian date 365 (or 366 based on what year, your OS will know)!

Let me know if you have any problems with converting the current date to Julian day!

Remember to have fun!
0