Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pointer to My Pictures folder 3

Status
Not open for further replies.
Oct 7, 2007
6,597
0
36
US
I set up a batch file today using robocopy to copy the contents of the Documents folder to an external hard drive for backup purposes.
robocopy.exe C:\users\USER\documents X:\weekly\documents /MIR /XA:SH /FFT /TEE /ZB /R:2 /W:5 /LOG+:"C:\weekly.log"

The content of the Documents folder copied over no problem. What I didn't expect was that it also copied all the data in My Pictures as well. Is there some kind of a hidden pointer to the My Pictures folder because certainly the Pictures folder is NOT a subfolder of the Documents folder.

I figured it out by noting that the documents folder was 10GB but the backup folder had something like 30GB in it. The robocopy log file showed it copying everything in the My Pictures folder.

"Living tomorrow is everyone's sorrow.
Modern man's daydreams have turned into nightmares.
 
Open the file explorer. Right click on your pictures folder, go to properties. Go to the Location tab; you will see the actual physical location of the folder.


Just my $.02

"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."

--Greg
 
goombawaho said:
because certainly the Pictures folder is NOT a subfolder of the Documents folder.
Did you browse to C:\users\USER\Documents to verify "Pictures" didn't exist there, or did you browse to "Documents" from the Quick Access are of File Explorer?

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Pretty sure I wasn't incompetent enough to misunderstand the path because I did check it. I'll look again when I'm there next. Can post an excerpt of the log file to prove it's doing what I said.

I can't test it on my computer because I have a separate boot and data drive.

"Living tomorrow is everyone's sorrow.
Modern man's daydreams have turned into nightmares.
 
odd...
checked my "My Documents" folder which I see is a junction to the Documents folder.
Code:
05/12/2016  03:49 PM    <JUNCTION>     My Documents [C:\Users\jezequiel\Documents]

"dir /ad" shows junctions to 3 folders including "My Pictures"
Explorer does not show these.

Code:
05/12/2016  03:49 PM    <JUNCTION>     My Music [C:\Users\jezequiel\Music]
05/12/2016  03:49 PM    <JUNCTION>     My Pictures [C:\Users\jezequiel\Pictures]
05/12/2016  03:49 PM    <JUNCTION>     My Videos [C:\Users\jezequiel\Videos]
 
Yeah - that's what I was thinking of. It is the same in Windows Vista and above I believe. In fact Robocopy has an option to ignore junction points - /XJ which I was not using.

I just like it to be a cleaner copy in terms of where things end up, like:
Desktop >> Desktop
Documents >> Documents
Pictures >> Pictures

Easier for customer for self-restores.

Now the question is, would it double copy the pictures if you had these two lines in the batch file?
robocopy.exe C:\users\USER\documents X:\weekly\documents
robocopy.exe C:\users\USER\pictures X:\weekly\pictures

"Living tomorrow is everyone's sorrow.
Modern man's daydreams have turned into nightmares.
 
I had used dir at command line in past, but had never looked at the arguments. Thanks for sharing, JustinEzequiel. Pretty interesting.

"But thanks be to God, which giveth us the victory through our Lord Jesus Christ." 1 Corinthians 15:57
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top