Home > Archive > PERL Beginners > February 2005 > Moving Directories containing files (something more tricky)
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Moving Directories containing files (something more tricky)
|
|
| Bastian Angerstein 2005-02-24, 3:56 pm |
|
Hello there,
I have a tricky problem, I have some (alot) directories containing
alot of files. I want to move the directory /xyz/123/ with all containing
files to /xyz/abc/123.
The source directory does not (or should not) contain subdirectories.
Does anybody have something for me ?
Thanks,
Bastian
| |
| Wiggins d'Anconia 2005-02-24, 3:56 pm |
| Bastian Angerstein wrote:
> Hello there,
>
> I have a tricky problem, I have some (alot) directories containing
> alot of files. I want to move the directory /xyz/123/ with all containing
> files to /xyz/abc/123.
>
> The source directory does not (or should not) contain subdirectories.
>
> Does anybody have something for me ?
>
> Thanks,
> Bastian
>
>
perldoc -f mkdir
perldoc -f rename
perldoc File::Path
perldoc File::Copy
What have you tried, where did you fail?
http://danconia.org
| |
| Chris Devers 2005-02-24, 3:56 pm |
| On Thu, 24 Feb 2005, Bastian Angerstein wrote:
> I have a tricky problem, I have some (alot) directories containing
> alot of files. I want to move the directory /xyz/123/ with all
> containing files to /xyz/abc/123.
Maybe I'm being dense, but doesn't that just mean
mkdir /xyz/abc
mv /xyz/123 /xyz/abc/123
?
It shouldn't matter how full 123 is; moving it is a simple operation.
If you're trying to do something more complex that I'm missing, maybe
you should describe the problem a bit more, and show us the code that
you've been attempting to use.
--
Chris Devers
| |
| JupiterHost.Net 2005-02-24, 3:56 pm |
|
> perldoc -f mkdir
> perldoc -f rename
> perldoc File::Path
> perldoc File::Copy
Also see, File::Copy::Recursive :) quite nice and simple.
HTH :)
Lee.M - JupiterHost.Net
|
|
|
|
|