(delete-file) does not accept wildcards?

Started by pjot, December 11, 2007, 06:42:10 AM

Previous topic - Next topic

pjot

Hi,



It seems that this code is not working:


Quote
> (delete-file "somedir/*.*")

nil


Why not? Do I first have to setup a list of files in that directory, and then walk through that list to delete them one-by-one...? :-(



Regards

Peter

cormullion

#1
I suspect that delete-file only takes a filename, not a pathname. So *.* isn't valid.



Just a thought.

pjot

#2

(dolist (x (directory temp_dir)) (delete-file (append temp_dir "/" x)))


...but the wildcard is more easy.



Peter