I have been trying to delete several files by using wildcard using either
remove or _unlink, but non of them seems to work.
char temp_files[MAX_PATH];
strcpy(temp_files, "c:\\tmp*.*");
_unlink(temp_files); // doesn't work
remove(temp_files); // doesn't work either
Can someone please tell me how I delete several files using wildcard?
Thanks in regards,
Jess
---
Jess Nielsen, HND/C
Systems Developer
"I don't want to be a pie, I don't like gravy!"
Windows: you can FindFirstFile, FindNextFile loop.
---
Posted via news://freenews.netfront.net
Complaints to ne...@netfront.net
But what if I'm not using windows?
O.P.:
The remove() function is for removing a single file.
You will need to use operating system functions for
deleting more than one file at a time.
You could use the system() function and specify
the OS command for deleting many files.
For more information about deleting many files,
please consult a newsgroup about your platform.
See the FAQs and Welcome.txt listed below.
--
Thomas Matthews
C++ newsgroup welcome message:
http://www.slack.net/~shiva/welcome.txt
C++ Faq: http://www.parashift.com/c++-faq-lite
C Faq: http://www.eskimo.com/~scs/c-faq/top.html
alt.comp.lang.learn.c-c++ faq:
http://www.raos.demon.uk/acllc-c++/faq.html
Other sites:
http://www.josuttis.com -- C++ STL Library book
Felony. $250,000 fine and five years in prison (ten
years on a second offense).
regards,
alexander.
HTH,
--ag
--
Artie Gold -- Austin, Texas
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---