Solved

Robocopy removes empty folder

Posted on 2015-01-07
1
102 Views
Last Modified: 2015-01-11
Hi,

I have this script looking like this:
robocopy K:\K10S K:\Archive /MOVE /MINAGE:1

Open in new window


It is working fine except that when the root folder is empty the script removes the folder totally and I want to avoid that. How can I do it?

Thanks for help!

Peter
0
Comment
Question by:peternordberg
1 Comment
 
LVL 83

Accepted Solution

by:
oBdA earned 500 total points
ID: 40535911
Since you're not copying subfolders, you can simply use /MOV instead of /MOVE.
0

Featured Post

Free Trending Threat Insights Every Day

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.

Join & Write a Comment

Suggested Solutions

YESTERDAY YESTERDAY.BAT is inspired by a previous article I wrote entitled: TOMORROW.BAT (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/MS_DOS/A_4196-Advanced-Batch-File-Programming-TOMORROW-BAT.html). The crux of this batch f…
You may have already been in the need to update a whole folder stucture using a script. Robocopy does it well and even provides a list of non-updated files in a log (if asked to). Generally those files that were locked by a user or a process by the …
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

708 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

13 Experts available now in Live!

Get 1:1 Help Now