Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2011

    Unanswered: Help Delete All file in SubFolder

    I am a new developer, I want to create a program to delete all the files in subfolders using the listbox. Can anyone help me I am use VB6

  2. #2
    Join Date
    Jun 2004
    Arizona, USA
    Sorry - I'm trying to understand exactly what you are trying to accomplish. "delete all the files in subfolders using the listbox" doesn't explain things very well...

    A listbox is a user interface control, which doesn't do anything except display the contents of the list items stored within the listbox, and allow the user to choose one or more of these items. It will not read a folder, or self populate, or do anything with the data it contains.

    Are you attempting to display the contents of a folder, allowing a user to choose one or more of the file names, and then delete these files, or are you attempting to allow the user to select a folder, and then delete all files contained within the folder chosen by the user?

    And, if the latter, how do you want to address potential sub-folders (and sub-sub-folders, ad-nauseum, as a directory structure is a tree structure) ?

    Do your questions concern getting a directory using the DIR command, deleting the files, or do they fall in the arena of recursion?
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts