|
|
| Think about Loose Coupling | |
| PerlMonks |
How do I copy an empty directory?by Anonymous Monk |
| on Oct 02, 2012 at 20:20 UTC ( #996906=perlquestion: print w/ replies, xml ) | Need Help?? |
|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
This question seems so simple, I am almost embarrassed to ask it but yet I can't figure it out so here goes. I have an empty directory name, x:\this\directory\name\is\empty. How can I move the empty directory named "empty" at the end of the path to c:\temp for example to make c:\temp\empty?
The operating system is Windows in case that matters and I actually thought about using a system call to either xcopy or robocopy and neither of them will do it either, even with all attempts at using their switches such as /e /s /t, and more. All I can seem to copy is all the data UNDER the directory if it were NOT empty but again, some directories in my path are empty and some are not so I need to copy them all, either way. Any ideas would certainly be welcome. Thank you.
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||