void main() { string dir=input_box("Enter the directory", "Enter the directory you want to search in. Don't put any slashes at the end", "weapons"); if(dir=="") exit(); string[] dirs=find_directories(dir+"/*"); string name=input_box("enter the filename", "Enter the filename that you would like to take the name out"); if(name=="") exit(); for(uint i=0; i-1) { file_copy(dir+"/"+dirs[i]+"/"+fs[i2], dir+"/"+dirs[i]+"/"+string_replace(fs[i2], name, "", true), true); file_delete(dir+"/"+dirs[i]+"/"+fs[i2]); } else { alert("Error", "No file could be found with "+name+" in it's name. Make sure you have typed the text that you want to clear correctly"); exit(); } } } alert("success", "There should be no file with "+name+" in it's name"); exit(); }