Archive: deleting files. only part of the name known


deleting files. only part of the name known
hello,

as the subject sais, i must delete some files.
but i don't know the full name of the files only a part that does not modify. i must delete the older versions.

for example : i have the file some_file_123.txt
ok. i need to delete all files that have the name some_file_XXXXXX.txt where XXXXXX can be any caracter, letters, numbers, punctuation.

can this be done ? because i have no idea how.

thanks in advance,
OJi.



outfile 'test.exe'

section -
Setoutpath $EXEDIR
FindFirst $R0 $R1 "some_file_*.*"
messagebox mb_ok "$R1"
delete "$EXEDIR\$R1"
_loop:
strcmp $R1 '' _end
FindNext $R0 $R1
messagebox mb_ok "$R1"
delete "$EXEDIR\$R1"
goto _loop
_end:
FindClose $R0
sectionend

If you don't know the number of characters:

Delete $INSTDIR\some_file_*.txt
If you do:
Delete $INSTDIR\some_file_??????.txt

did not knew that.

many thanks.