in reply to File::Find help
In your code, you are checking whether you have a file (-f). Maybe you want to do something there if you have a directory (-d)?
Note that you get the directory likely before all the files, so you might need to remember that you want to unlink rmdir a directory after you've successfully moved all the files.
Update Laurent_R noted the difference between unlink and rmdir.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: File::Find help
by colox (Sexton) on Dec 02, 2017 at 09:53 UTC | |
by Corion (Patriarch) on Dec 02, 2017 at 10:07 UTC | |
by colox (Sexton) on Dec 02, 2017 at 13:19 UTC | |
by marto (Cardinal) on Dec 02, 2017 at 13:29 UTC | |
by colox (Sexton) on Dec 02, 2017 at 13:44 UTC | |
|