Solved

Robocopy removes empty folder

Posted on 2015-01-07
1
108 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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Introduction: Recently, I got a requirement to zip all files individually with batch file script in Windows OS. I don't know much about scripting, but I searched Google and found a lot of examples and websites to complete my task. Finally, I was ab…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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