Delete files in a folderHi All,
Is there a way to delte all .txt,.csv,.jrn and .png files in a folder before running a script to repopulate everything?
I do want to keep my. json file in the same folder.
Thank you so much. I really appreciate your time and effort.
Re: Delete files in a folderOops, the word() functions reference should have been
If(word(-1,Y[i],".") == "txt"
negative values indicate to count from the right, positive values count from the left
Go to
Help==>Scripting Index==Functions==>Character==>Word
for documentation and example
Re: Delete files in a folderIs there a way to count from the left as I have "." in the name also?Re: Delete files in a folderYou can use
Y = Files In Directory( <PATH> );</PATH>
to get the files, and then loop through the list of files and determine if the file is of the type you want to delete, and then delete it
If(word(=1,Y[i],".") == "txt",
r= Delete File(<PATH> || Y[i]);
);</PATH>