DeleteFile() is not working!!!

This is a discussion on DeleteFile() is not working!!! within the C++ Programming forums, part of the General Programming Boards category; I want to make a program that will clear cookies, clear temps, and clear TIFs. But delete file won't work ...

  1. #1
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342

    Post DeleteFile() is not working!!!

    I want to make a program that will clear cookies, clear temps, and clear TIFs. But delete file won't work on any of these. Why? And, what can I do to mke it work.

  2. #2
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    post your program. DeleteFile() does NOT work with wild-cards, for it will fail if you give it the filename "*.xyz". To do that, you need to use FindFirstFile() and FindNextFile() then DeleteFile() for each filename it returns (don't attempt to delete directories/folders).

  3. #3
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,506
    Yet another "It doesn't work post" without any sign of what was actually attempted or even that it was attempted at all....
    Post Yer Code!!!!
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  4. #4
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Okay, I have it working now. Thanks for your help.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Function not working
    By sloopy in forum C Programming
    Replies: 31
    Last Post: 11-12-2005, 07:08 PM
  2. Program Not working Right
    By raven420smoke in forum C++ Programming
    Replies: 2
    Last Post: 09-16-2005, 03:21 AM
  3. Trying to eject D drive using code, but not working... :(
    By snowfrog in forum C++ Programming
    Replies: 3
    Last Post: 05-07-2005, 07:47 PM
  4. x on upper right corner not working
    By caduardo21 in forum Windows Programming
    Replies: 1
    Last Post: 02-20-2005, 07:35 PM
  5. cygwin -> unix , my code not working properly ;(
    By CyC|OpS in forum C Programming
    Replies: 4
    Last Post: 05-18-2002, 04:08 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21