Quantcast
Channel: Windows 7 Miscellaneous forum
Viewing all articles
Browse latest Browse all 11372

ROBOCOPY creates empty directories when user running it does not have rights to a folder's contents

$
0
0
Hi,

Just something for Microsoft or possible solution comment really...

Logon script creates user Start Menu based on what rights they have on a networked master copy.

ROBOCOPY.EXE is used for the copy like this:

ROBOCOPY <source> <target> /MIR /MT /R:0

This will create the Start Menu for the user on 1st logon, and the /MIR will update it on subseqent logons. It works well.

Except for, /R:0 will immediately skip and continue if the user has no rights to a folder or it's contents. In this case, ROBOCOPY creates an empty folder which is quite annoying, regardless of other settings tried such as /S.

Luckilly I have a small DLL of useful functions used by our logon scripts and one of these will remove all empty subdirectories from the specified directory so I can work around this.

I can't find any combination of switches on ROBOCOPY to fix this, however, for example, XCOPY does not do this if a user has no rights to a folder.

Any suggestions?!

Thanks!

Rob

Viewing all articles
Browse latest Browse all 11372

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>