I'm trying to erase unwanted files from a directory.
My software changes some file names to have a comma
and a number appended to the extension. I can't get
Rexx to understand the name: xxxxxxxx.scr,1
If there are two files with the same name, it only
finds the one without the , in the extension.
In the following example there are two files in
do until lines(infile) = 0 / start the directory listing loop /
l = (linein(infile)) / define the line variable /
parse var l . / parse the line /
if right(l,4) = '.jrl' then erase l / remove .jrl files /
if right(l,6) = '.jrl,1' then erase l / remove ,1 files /
if right(l,2) = ',2' then erase l / remove ,2 files /
if right(l,2) = ',3' then erase l / remove ,3 files /
if right(l,1) = '%' then erase l / remove % files /
if right(l,7) = 'SAV.lnk' then erase l / remove the .SAV files /
if right(l,4) = '.SAV' then erase l / remove the .SAV files /
if l = 'AUTO.brd' then erase l / remove the AUTO.brd file /
if l = 'signoise.run' then 'rmdir /s /q' l / remove the signoise.run dir /
end / end the directory listing loop /
After finding and erasing xxxxxxxx.jrl it gets to xxxxxxxx.jrl,1 and reports
Could not find .......xxxxxxxx.jrl
It doesn't understand that the file name continues past the comma.
Any help would be appreciated.
Please don't double post, your question has been answered already in https://sourceforge.net/p/oorexx/discussion/408478/thread/2c346a96/#1a86/7389.
Sorry I had gotten no response.