Go Back   Tech Support Forum > Microsoft Support > Windows 10 Support

User Tag List

Robocopy destination folder not showing, but it exists

This is a discussion on Robocopy destination folder not showing, but it exists within the Windows 10 Support forums, part of the Tech Support Forum category. I just started using robocopy for my backups with the following script: robocopy C:\Users\Admin\Desktop E:\C\Desktop /MIR /MT /R:5 /W:15 /NS


Reply
 
Thread Tools Search this Thread
Old 05-17-2020, 08:31 PM   #1
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



I just started using robocopy for my backups with the following script:


Quote:
robocopy C:\Users\Admin\Desktop E:\C\Desktop /MIR /MT /R:5 /W:15 /NS /NC /NFL /NDL /NP /LOG+:\rlogs\log.txt
robocopy C:\Users\Admin\Documents E:\C\Documents /MIR /MT /R:5 /W:15 /NS /NC /NFL /NDL /NP /LOG+:\rlogs\log.txt
robocopy C:\Users\Admin\Downloads E:\C\Downloads /MIR /MT /R:5 /W:15 /NS /NC /NFL /NDL /NP /LOG+:\rlogs\log.txt
robocopy D:\ E:\D /MIR /MT /R:5 /W:15 /NS /NC /NFL /NDL /NP /LOG+:\rlogs\log.txt
As seen above, I copied the entirety of my D:\ drive to a folder called "D" on my backup hard drive. However, the folder is not showing. My folder options are set to display hidden folders. And the folder does exist, because if I try to create a new folder called "D", I get a prompt stating that one already exists. Also, the used space on the backup drive matches the size of all the original files/folders that I set to copy.


There is one thing I should note: I ran the first three lines in the script as their own commands in powershell to make sure that I had configured it correctly and because the total sizes for the first three folders is rather small. I then ran my .bat file that contains all four lines and I mistakenly thought that the process had completed and just didn't copy over the D:\ drive. So I closed the powershell window and restarted my PC and was then going to try and troubleshoot the script. However, I noticed that some GB's had been filled on the backup drive, so it seems that I had closed the powershell window while the command was still running. I then ran the command again until it fully completed and the window closed on it's own. But the "D" folder is still not showing.
garmo91 is online now   Reply With Quote
Sponsored Links
Advertisement
 
Old 05-17-2020, 09:40 PM   #2
Moderator TSF
Hardware Team Moderator
 
Stancestans's Avatar
 
Join Date: Apr 2009
Posts: 5,130
OS: Windows 10



Is the folder listed by the DIR command? Did you also enable the viewing of system files (super hidden or protected operating system files)? Try renaming the folder via command line.
Stancestans is offline   Reply With Quote
Old 05-17-2020, 10:34 PM   #3
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



The folder doesn't display using the DIR command, but I was able to select it using the command "cd D" and I was able to view all the subfolders when I used the DIR command once it was selected.


It does seem that it's being treated as super hidden. "Hide protected operating system files" was checked, and upon unchecking it, the folder is showing up. Is there a way to prevent this from happening and do you have any idea why it may have happened in the first place?
garmo91 is online now   Reply With Quote
Sponsored Links
Advertisement
 
Old 05-17-2020, 11:10 PM   #4
Moderator TSF
Hardware Team Moderator
 
Stancestans's Avatar
 
Join Date: Apr 2009
Posts: 5,130
OS: Windows 10



I don't know why it happened, but you can remove the system attribute from the folder using the ATTRIB command.
Stancestans is offline   Reply With Quote
Old 05-17-2020, 11:30 PM   #5
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



I used the following command: attrib -s -h E:\D


This fixed the issue, however as soon as I run my batch file again, the attributes reset to hidden. My only guess is that this is happening because I'm mirroring the entire hard drive rather than each individual folder, but I'm not sure exactly what about that fact is causing the issue...


edit - it seems that robocopy will set these attributes to a destination folder when an entire drive is copied based on what I've read here: https://serverfault.com/questions/15...-backup-drives


I'm not sure why this was implemented, but I guess I'll just run the attrib command whenever I backup.
garmo91 is online now   Reply With Quote
Old 05-18-2020, 12:04 AM   #6
Moderator TSF
Hardware Team Moderator
 
Stancestans's Avatar
 
Join Date: Apr 2009
Posts: 5,130
OS: Windows 10



Look at ROBOCOPY's switches again for any that deal with attributes. I'm mobile right now and can't look deeper into this at the moment, but you should be able to find online documentation and other information on ROBOCOPY. Google ROBOCOPY ATTRIBUTES for a start.

Edit:
Can't you use the drive path + a wildcard as the source instead of the drive path only? For example, D:\* instead of D:\
Stancestans is offline   Reply With Quote
Old 05-18-2020, 10:03 PM   #7
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



Sorry, Im very up to speed with robocopy or with using the command line in general. I set up my script based on a video I watched.

I read here trying to find what you said about attributes and I see option /copy:A may achieve this? Do you know by chance if I were to add this to the line of the script if it would have to recopy all of the files?

Regarding wildcards, I read another article here that states wildcards can only be used for file names and not folders
garmo91 is online now   Reply With Quote
Old 05-18-2020, 11:20 PM   #8
Moderator TSF
Hardware Team Moderator
 
Stancestans's Avatar
 
Join Date: Apr 2009
Posts: 5,130
OS: Windows 10



Quote:
Originally Posted by garmo91 View Post
Sorry, Im very up to speed with robocopy or with using the command line in general. I set up my script based on a video I watched.

I read here trying to find what you said about attributes and I see option /copy:A may achieve this? Do you know by chance if I were to add this to the line of the script if it would have to recopy all of the files?

Regarding wildcards, I read another article here that states wildcards can only be used for file names and not folders
You're right. ROBOCOPY expects a directory path as the source and destination and wildcards are not allowed for those. No, the /copy:A option won't achieve that because it is implied by default. It seems the only way is to run the attrib command on the destination directory after robocopy.
Stancestans is offline   Reply With Quote
Old 05-19-2020, 12:15 AM   #9
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



Quote:
Originally Posted by Stancestans View Post
You're right. ROBOCOPY expects a directory path as the source and destination and wildcards are not allowed for those. No, the /copy:A option won't achieve that because it is implied by default. It seems the only way is to run the attrib command on the destination directory after robocopy.
Bummer. Well, Im glad I at least know why its happening now. Thanks for your help again. Take care.
garmo91 is online now   Reply With Quote
Old 05-19-2020, 12:26 AM   #10
Moderator TSF
Hardware Team Moderator
 
Stancestans's Avatar
 
Join Date: Apr 2009
Posts: 5,130
OS: Windows 10



Out of curiosity, why are you using ROBOCOPY instead of a GUI sync/backup program?
Stancestans is offline   Reply With Quote
Old 05-19-2020, 04:40 PM   #11
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



I was using File History previously, but it seems like the way the files are stored requires the utility to be used again to restore the files. I wanted a solution where I could just connect the drive and drag/drop files back onto my PC and that would be compatible with a PC that may not have the File History feature
garmo91 is online now   Reply With Quote
Old 05-20-2020, 03:11 AM   #12
TSF Team, Emeritus
 
spunk.funk's Avatar
 
Join Date: May 2010
Location: Los Angeles
Posts: 40,531
OS: Windows 10 64 bit

My System


Quote:
I wanted a solution where I could just connect the drive and drag/drop files back onto my PC
Why can't you use Drag and Drop from one drive to another?
__________________
Please press the Like link to right of any post you found helpful.
spunk.funk is offline   Reply With Quote
Old 05-20-2020, 01:53 PM   #13
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



Quote:
Originally Posted by spunk.funk View Post
Why can't you use Drag and Drop from one drive to another?
Drag/drop would work for the initial backup, but my understanding is that drag/drop will not overwrite files that have been changed if they still have the same file name. For example, if I update the tag on an audio file, drag/drop would not replace the old file with the new one if the file name itself was the same. Whereas robocopy does recognize file changes.
garmo91 is online now   Reply With Quote
Old 05-20-2020, 03:16 PM   #14
TSF Team, Emeritus
 
spunk.funk's Avatar
 
Join Date: May 2010
Location: Los Angeles
Posts: 40,531
OS: Windows 10 64 bit

My System


Try Teracopy. When you copy with Teracopy if it finds a file with the same name in the same folder, it asks you do you want to Replace it? Keep both copies with a different name? or only copy Older Versions? Or Skip this file. You can turn on Checksum in the Preferences as well.
__________________
Please press the Like link to right of any post you found helpful.
spunk.funk is offline   Reply With Quote
Old 05-20-2020, 07:55 PM   #15
Moderator TSF
Hardware Team Moderator
 
Stancestans's Avatar
 
Join Date: Apr 2009
Posts: 5,130
OS: Windows 10



Check out https://freefilesync.org/
Stancestans is offline   Reply With Quote
Old 05-21-2020, 04:53 PM   #16
Registered Member
 
Join Date: Jul 2013
Posts: 82
OS: Windows 10 Home 64-bit



Ill look into these programs over the weekend. I like the idea of the hashchecks with TeraCopy. Thanks for pointing these out.
garmo91 is online now   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is on
Smilies are on
[IMG] code is on
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Post a Question


» Site Navigation
 > FAQ
  > 10.0.0.2
Powered by vBadvanced CMPS v3.2.3


All times are GMT -7. The time now is 05:41 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
vBulletin Security provided by vBSecurity v2.2.2 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.1.0 (Pro) - vBulletin Mods & Addons Copyright © 2020 DragonByte Technologies Ltd.
Copyright 2001 - 2018, Tech Support Forum

Windows 10 - Windows 7 - Windows XP - Windows Vista - Trojan Removal - Spyware Removal - Virus Removal - Networking - Security - Top Web Hosts