Icacls & moving folders

Posted on 2009-02-18
Last Modified: 2013-11-29
I am faced with the following:

Users my documents folders have bean redirected to:

1)      \\myserver\departments\<department name>\users\%username%\My Documents

I want to tidy this up to

2)      \\myserver\users\%username%\My Documents

By moving the folders from location 1 to location 2

 I do not have F permission for a lot of <department name> folders so my thinking is:

Step 1 Take ownership of \\myserver\departments\<department name>\users folder
Step 2 Grant administrator F to \\myserver\departments\<department name>\users folder
Step 3 Move \\myserver\departments\<department name>\users\* to  myserver\users\*
Step 4 Set F for administrator and User on \\myserver\users\%username%\

I am going to do this one department at a time

So I am using

icacls A:\Departments\IT\Users\ /setowner domainname\administrator /T /C

And my problems are

It iterates only trough the first %username% folder in D:\Departments\IT\Users\

I get

My Music: Access is denied.
My Pictures: Access is denied.
My Videos: Access is denied.

help with compleating the full task for 500 points
Question by:spd21
    LVL 38

    Accepted Solution

    You may want to look at robocopy or "Robust File Copy" -- command line utility from the Server Resource Kit.
    LVL 38

    Expert Comment

    by:Jim P.
    Glad to be of assistance. May all your days get brighter and brighter.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    I see at least one EE question a week that pertains to using temporary tables in MS Access.  But surprisingly, I was unable to find a single article devoted solely to this topic. I don’t intend to describe all of the uses of temporary tables in t…
    Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
    What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now