NOOB asking for script help with two rename problems
Posted: 16 Jan 2020, 23:23
Thanks for any help provided.
I am a relative noob to programming but have been able to cobble together several scripts for the gui that run with relative correctness, but am having problems with 2 situations :
the first: I have a script to modify a file name but have some files that end with "(1)" "(2)" (3) etc [without the quotes] that usually indicate duplicates, and I can't figure out how to remove those brackets and number and not remove other brackets and contents. It is not on all files only those that are duplicate.
Second: I have a bunch of words (10 right now, but could add more) that I remove from the file name. Right now I am just using fn.removeAll("words") for each instance/word that i want to remove. some of the words start with a - and others do not. for example removeAll("-worda").removeAll("wordb").removeAll("word-c") . although this works I can't help thinking it is inefficient and was wondering if there was a way of doing it more succinctly that would allow for the future addition of more words.
thanks for your time and a great program
Kallita
I am a relative noob to programming but have been able to cobble together several scripts for the gui that run with relative correctness, but am having problems with 2 situations :
the first: I have a script to modify a file name but have some files that end with "(1)" "(2)" (3) etc [without the quotes] that usually indicate duplicates, and I can't figure out how to remove those brackets and number and not remove other brackets and contents. It is not on all files only those that are duplicate.
Second: I have a bunch of words (10 right now, but could add more) that I remove from the file name. Right now I am just using fn.removeAll("words") for each instance/word that i want to remove. some of the words start with a - and others do not. for example removeAll("-worda").removeAll("wordb").removeAll("word-c") . although this works I can't help thinking it is inefficient and was wondering if there was a way of doing it more succinctly that would allow for the future addition of more words.
thanks for your time and a great program
Kallita