Question

  • Creator
    Topic
  • #2212493

    Move Multiple User shares

    Locked

    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…

All Answers

  • Author
    Replies
    • #2855100

      Clarifications

      by techintern ·

      In reply to Move Multiple User shares

      Clarifications

    • #2855098

      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.

    • #2854992

      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 🙂

Viewing 2 reply threads