I'm using a script to copy several files and some of the files that I have use a pound sign (#) in them. But for some reason any files with the # in their name fail when using 'copyto', and I am wondering if anyone has any suggestions.
Filename example would be:
1234#678a66000~a.txt
I am using the following regex to break apart the filename into parts to be wildcards:
([0-9a-z_#\-]*)([a-z0-9]{3})([0-9]{3})~([0-9a-z\-]*)\.([a-z]*)
So after using my regex, what the copyto command would look for would be, but fails on:
1234#678*~a.txt
Does anyone know how to fix this so it doesn't fail on the copyto for a filename like this (1234#678*~a.txt)?
Copyto with pound sign (#)
Re: Copyto with pound sign (#)
It's interpreted as a digit (the #) and the filename doesn't have a digit at that place. Don't know if this can be changed, escaping it ([#]) does not work here. I'd suggest to use a ? instead.
One of my scripts helped you out? Please donate via Paypal
Re: Copyto with pound sign (#)
That worked! Thank you, highend!