Hello Monks,
I am wanting to copy a directory and all of its contents, including files and subdirectories, to another location. In addition, there are certain file extensions that may exist that I do not want copied, such as .lck which the script needs to account for. Unfortunatly, my search endevours have produced no hits.
I am running this on windows. I have explored XCOPY but Xcopy does not have a way to exclude or match a regular expression. I also was using File::Copy and File::Path. This was working, until it came upon a subdirectory. In which case the sub directory and the contents in the subdirectory were not copied to the new location.
So in a nutshell, i need to do exactally what "xcopy /E /I /F /R <source> <destination>" would do except that I need it to look for files such as ".lck" files and not copy them over
Any help and sample script would greatly be appreciated on how to accomplish this task
In reply to Copy files and subdirectories by g_speran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |