#1 : 24/08-19 08:04
Hi. Sorry for my english.
I have many list of name in notepad, then, how to delete a files name with the source from notepad/csv ?
only know rename with Replace List method, are there have other methods ?
I want to delete some of name based in notepad/csv.
everything name written in notepad should be deleted.
list notepad :
my file name :
Class A1 [michael andy roland ethan]
Class A2 [randy nina sean defoe]
Class A3 [chand alex maria betha]
24/08-19 08:04 - edited 24/08-19 10:24
#2 : 25/08-19 12:34
The obvious answer would be to use the List replace method. Unfortunately so far there is no way of importing the list from a file so this will not be a workable solution for a large number of names.
A workaround is to use the Script method with the replacements hard-coded. Add spaces before and after the list of students as delimiters and then replace "space+name+space" with "space" for each student. Finally remove the two additional spaces.
For your limited example enter the script:
var str = item.name;
str = str.replace("[","[ ");
str = str.replace("]"," ]");
str = str.replace(" andy "," ");
str = str.replace(" betha "," ");
str = str.replace(" chand "," ");
str = str.replace(" defoe "," ");
str = str.replace(" ethan "," ");
str = str.replace("[ ","[");
str = str.replace(" ]","]");
Obviously entering all the code manually will be tedious if you have a large number of names to remove. However you can easily create the middle block of code from your existing list automatically, using Excel (or a similar spreadsheet application).
If you are using Excel: import your file containing the list of names into the first column of a worksheet and paste the following formula into cell B1:
="str = str.replace("" "&A1&" "","" "");"
This will create the code: str = str.replace(" name_in_A1 "," ");
Copy the formula down to the end of the worksheet then copy the contents of column B and paste as code into the Renamer script.
#3 : 27/08-19 04:34
thank you for your answer
it really saved my time.
actually until now I use almost the same method but a different way.
I write all the names in Excel like this.
copy all name & paste to the word. find&replace a Paragraph mark + Tab Character then replace all.
and the result is like this
\andy \betha \chand \defoe \ethan
im using remove patern methods to remove all the name.
27/08-19 04:34 - edited 27/08-19 17:04