Question

Locked

Move Multiple User shares

By TechIntern ·
I am doing some cleanup of our users shares folder and need to move some user folders and subfolders to a different directory. I have the usernames separated by comas in a text file. I have created a batch file which works for xcopy but not move. It is a windows 2000 server
here is the script i am using

for /F "delims=," %%i in (D:\moveutils\Users.txt) do move "D:\users\%%i\*.*" "D:\Disabled User Archive\%%i" /e /s


can anyone help...

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Collapse -

Sounds like you're doing fine

by Kenone In reply to Move Multiple User shares

What do you need help with? Copy the files to the new location, change the permissions on the old location so that only the admin has access. Let the dust settle, wait, wait, wait. Okay now delete the old locations folders.

Collapse -

If you're moving files

by neilb@uk In reply to Move Multiple User shares

You need the destination folder to exist if I remember correctly. Xcopy doesn't - and will, as a default, automatically create a target folder if copying multiple files.

Run the loop twice, first to md "D:\Disabled User Archive\%%i"

Or why not just move the entire folder? That will take everything across in a couple of seconds.

for /F "delims=," %%i in (D:\moveutils\Users.txt) do move "D:\users\%%i" "D:\Disabled User Archive\"

Neil :)

Back to Software Forum
2 total posts (Page 1 of 1)  

Related Forums