Script Command to Remove Illegal File Name Characters ?
Posted: 22 Jan 2024 22:44
hi! i've been experimenting with a rename script for certain files that i have. the name of the file isn't important, so i originally went with the HASH of the file using the hash() function - works great, especially when i shorten it to the first 7 like github format.
today i had the idea to use the digest hash using code i found here in another thread - it too works really well (uses runret with openssl). the problem i face now is there is sometimes a character that is illegal to use in a file name, for example, the / :
is there an XY SC that i can use to strip out these types of characters ? something to make it 100% "legal" as a file name.
i'm going through the different commands in the help file now but nothing has stood out. i may not end up using it and just the hash() results, but it would be nice to figure it out.
today i had the idea to use the digest hash using code i found here in another thread - it too works really well (uses runret with openssl). the problem i face now is there is sometimes a character that is illegal to use in a file name, for example, the / :
Code: Select all
DYXtPYGyGoFqoCr33g8SmNAMUKDaTUVM30DyNui6CV/FL8GxV5g8OkwXGue1/qtGi'm going through the different commands in the help file now but nothing has stood out. i may not end up using it and just the hash() results, but it would be nice to figure it out.