I would like to know how can I set up a vbscript to copy-remove files based on len of a file name.
I have a C:\from folder and a C:\to folder I would like to:
1-copy files which have a file name len= 14 (including extension) from C:\from to C:\to
2-delete all the files from C:\from which have a file name len>14 (including extension)
Generate a log file "log-file.txt" in the same folder in which the script is generated
if C:\from or C:\to doesn't exist logouput=C:\from or C:\to doesn't exist
List the various files copied from C:\from to C:\to and all the files removed in C:\from
If a file which need to be removed is opened by another user logouput=unable to remove the file as it is opened by another user
Thank you in advance for your feedback.