1

I'm trying to copy server files to sharepoint and there are a lot of files and folders that have full sentences as names and as such, when I try to copy these files into the sync folder on the server I get the error saying the path is too long. I tried using robocopy to see if it would bypass the error and copy the files anyway but there are still a lot of file that wont copy.

My question is how can I use the /fat option to only copy the files that are too long and not the files are that are fine. I don't want to end up with double the files (one in fat and one not) for the files already copied.

2
  • See this answer here as well as some others on that post that may help you with this: superuser.com/questions/1119883/…. If you are able to NTFS long paths, then perhaps you won't have to deal with this at all. Sep 26, 2018 at 23:10
  • Don't have the time to focus on this, but consider generating a list of files with the /L option to generate a list of those successfully copied, Flip their Archive bit with ATTRIB; then use the /A option of Robocopy to copy the uncopied files. Good luck, dude.
    – K7AAY
    Sep 26, 2018 at 23:17

1 Answer 1

0

I just try do same process to backup all company files (1,17TB) to company OneDrive a i use this command:

@echo off

SET Today=%Date:~8,2%%Date:~3,2%%Date:~0,2%

net use a: \\BACKUP_SERVER\Backup

chcp 1250

Robocopy D:\ "A:\OneDrive - Company" /A-:SH /R:0 /MIR /XF ~$*.* /XD "D:\$RECYCLE.BIN" "D:\System Volume Information" "D:\FTP" "D:\Scan" /NDL /NP /LOG+:"C:\Users\root\Documents\LOG\%Today%.txt"

And i have really long ways and without any problem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .