Automatic icloud backup to a singular folder on a Network drive

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
Foxman1999
Posts: 4
Joined: 28 Jul 2017 09:17

Automatic icloud backup to a singular folder on a Network drive

#1 Post by Foxman1999 » 28 Jul 2017 09:44

I will try to accurately describe what I want from this batch script.

1) It needs to be completely automated. I plan on attaching it to a scheduled task that will run every so often. I don't want to have to babysit the batch.
2) I need the source and destination set in clear variables. Something like Set copyfrom=C:\folder1\folder2\etc and Set copyto=M:\folder1\pictures. I'm not a good batch writer by no means, so this will help me if I ever need to change destination later. Please note, I'm copying to a network location, not the same drive.
3) The batch file will not be run from the source folder or the destination folder.
4) Any file with the exact same name and timestamp can be overwritten or skipped.
5) Any file with the exact same name and a different timestamp, new or old, needs characters amended to it. This item is crucial! I don't want to loose an old picture because a new one with the same file name overwrote it. Likewise, I don't want a new picture ignored because there was an old one in the destination with the same name.
6) Copy the timestamp with the files.
7) This is to archive photos, so nothing in the destination can be deleted
8) I only need one copy of any photo in the destination, so please, don't amend characters to every file
9) It needs to run through any sub-directories of source if any exist.

pieh-ejdsch
Posts: 240
Joined: 04 Mar 2014 11:14
Location: germany

Re: Automatic icloud backup to a singular folder on a Network drive

#2 Post by pieh-ejdsch » 29 Jul 2017 01:29

Hello Foxman,
This scipt may help you
File Versioning

Phil
Last edited by pieh-ejdsch on 31 Jul 2017 23:27, edited 1 time in total.

Foxman1999
Posts: 4
Joined: 28 Jul 2017 09:17

Re: Automatic icloud backup to a singular folder on a Network drive

#3 Post by Foxman1999 » 31 Jul 2017 09:38

Phil, I need help. When I try to execute the code you referred me to, command prompt exits underneather the TAB section. I've set a pause before and after the FOR command that is under that header and I cannot see the second pause. Any advise to continue testing to see if this script is for me?

pieh-ejdsch
Posts: 240
Joined: 04 Mar 2014 11:14
Location: germany

Re: Automatic icloud backup to a singular folder on a Network drive

#4 Post by pieh-ejdsch » 31 Jul 2017 23:22

Start the batch in the CLI and put the error message here in the contribution please.

Also give two concrete examples of your data, what is the network path from which the backup should be inserted.
How should the saved file name look, should the recursion in the target be repeated?
And from which original path the files are to be saved?

Phil

Foxman1999
Posts: 4
Joined: 28 Jul 2017 09:17

Re: Automatic icloud backup to a singular folder on a Network drive

#5 Post by Foxman1999 » 01 Aug 2017 17:05

Start the batch in the CLI


Forgive my ignorance, but how do I do this?

put the error message here in the contribution please.


I'm assuming this is part of running the batch in CLI mode

As far as two concrete examples, I have several groups of images with the same names and different time stamps. All are in sequencial order; IMG0001.jpg, IMG0002.jpg...; taken at two different times. My camera can only track 10,000 pictures at a time. The first go around started in 2008, the second in 2013, and the third this year. This creates duplicate files names with different time stamps on them. Ideally, I would like the file names to reflect the date they were taken on taken from the meta data. I'm not sure if this is possible. If not, a simple addition of a 123 numbering system would work. (I.E. IMG0001 2008.jpg, IMG0001 2013.jpg...; or IMG0001 (1).jpg, IMG0001 (2).jpg...) Recursion should only happen if the time stamps are different.

The network path used for the destination is \\home-server\pictures\wife

The source path is C:\users\%UserProfile%\pictures

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Automatic icloud backup to a singular folder on a Network drive

#6 Post by ShadowThief » 01 Aug 2017 20:28

Foxman1999 wrote:
Start the batch in the CLI


Forgive my ignorance, but how do I do this?


Open an explorer window to where the script is, hold shift and right-click, select "Open command window here" and when the black box with white text shows up, type in the name of the script.

I'm not sure why he referred to it as "the CLI;" it's called the command prompt (or sometimes just CMD).

penpen
Expert
Posts: 2009
Joined: 23 Jun 2013 06:15
Location: Germany

Re: Automatic icloud backup to a singular folder on a Network drive

#7 Post by penpen » 02 Aug 2017 11:27

ShadowThief wrote:I'm not sure why he referred to it as "the CLI;" it's called the command prompt (or sometimes just CMD).
He probably referred to it as "the CLI;" because the command line prompt is a command line interface (CLI), and you might use an alternative to the command prompt, which is also a CLI.

Sidenote:
CLI is also short for command line interpreter, which may or may not offer an user interface or shell.

penpen

Post Reply