Thread: how do i use FindFirstFile()

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    69

    how do i use FindFirstFile()

    FindFirstFile()
    FindNextFile()
    How do i use these like i want to delete every file in a certain place. if possible can u tell me like how to delete at executables or c files ?? i mean how to delete or view the files? that i found with find first file and find next file

  2. #2
    S­énior Member
    Join Date
    Jan 2002
    Posts
    982
    >How do i use these like i want to delete every file in a certain place

    You initialise the handle with the directory, and then iterate through it until FindNextFile() quits.

    >if possible can u tell me like how to delete at executables or c files ??

    remove() works (in cstdio). It doesn't matter what file type it is.

    > i mean how to delete or view the files?that i found with find first file and find next file

    To delete files see above. To view files you'll need the appropriate file type viewer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. FindFirstFile() Always Returns INVALID_HANDLE_VALUE
    By ThLstN in forum Windows Programming
    Replies: 10
    Last Post: 09-05-2008, 12:12 PM
  2. FindFirstFile() and std::string
    By Mostly Harmless in forum Windows Programming
    Replies: 4
    Last Post: 05-19-2008, 06:27 PM
  3. FindFirstFile
    By Coding in forum C# Programming
    Replies: 8
    Last Post: 02-13-2008, 04:49 AM
  4. FindFirstFile
    By Devil Panther in forum Windows Programming
    Replies: 10
    Last Post: 11-24-2006, 12:23 PM
  5. Searching for a file using FindFirstFile() ?
    By Brian in forum Windows Programming
    Replies: 7
    Last Post: 01-27-2002, 02:43 PM