Robocopy formula help please??

daisy777 1 Reputation point
2022-02-08T21:37:43.323+00:00

Okay so for work, I have to copy the same folders (and subfolders-there's a lot) WITHOUT the files in them into a new folder for 2022.

I used this formula in command prompt for work last year and it worked:

robocopy "C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\Clients" "C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\Clients\new" /e /xf *

Now it's saying the source cannot be found? Can anyone help? What can I put into command prompt that will copy each folder and subfolder (without the files) from the clients folder into a new folder?

Windows Hardware Performance
Windows Hardware Performance
Windows: A family of Microsoft operating systems that run across personal computers, tablets, laptops, phones, internet of things devices, self-contained mixed reality headsets, large collaboration screens, and other devices.Hardware Performance: Delivering / providing hardware or hardware systems or adjusting / adapting hardware or hardware systems.
1,548 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Michael Taylor 48,581 Reputation points
    2022-02-08T22:03:26.673+00:00

    If the source cannot be found then it sounds like your source path (the first argument) isn't a valid path anymore. Can you confirm that the source path is valid?

    Also note that your source path is a subset of the destination path. Therefore you could run into a recursive issue as the source path is containing the subfolders that you're trying to copy to. Try changing the destination path to something else such as C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\NewClients\new. If the copy succeeds correctly then you can move the new folder to the desired location as normal.

    robocopy "C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\Clients" "C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\NewClients" /e /xf *
    md "C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\NewClients" "C:\Users\AdvertisingCoordinator\BoomSync\Media Buying\Clients\new"
    
    0 comments No comments

  2. daisy777 1 Reputation point
    2022-02-08T22:47:19.613+00:00

    @Michael Taylor Thank you so much for your response!! I tried that, unfortunately it still says "Cannot find the path specified" I can't understand what else I could do differently??

    0 comments No comments

  3. daisy777 1 Reputation point
    2022-02-08T22:50:17.827+00:00

    IT WORKED!!! So for some reason I had to put "adver" instead of "advertisingcoordinator" and it's copying the files!!! What a relief THANK YOU

    0 comments No comments