Announcement

Collapse
No announcement yet.

File Lists

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • File Lists

    Hi,

    I've just purchased PB/WIN and am totally new to programming. If any kind soul out there is willing to help I've been asked to do the following.

    I have a directory of hundreds of files and I need to get a list of the files that were generated today using wildcards such as:

    pablib*.*
    pabcon*.*

    Is it possible to get the files identified into an array for later processing?.

    Thx,

    John

  • #2
    Sure, John, you use the DIR$() function to retrieve the names of files and sub-directories. That will do just what you need.

    Best regards,

    Bob Zale
    PowerBASIC Inc.

    Comment


    • #3
      If you need to qualify the files by date, you'll want to use the "TO DIRDATA" option added to DIR$() in version 9.

      Since you are new to programming you'll be asking how to use that option shortly because the documentation for this option is sorely lacking in detail.
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        John,
        I am also sure there are plenty of examples in the "Source Code Forum"

        (Some can be a bit overwhelming, depending on if you just want files in your folder, or files and subfolders (and files within each subfolder) or walking the whole directory tree)

        Pick one that best feels comfortable to you and we can assist from there with hints and helps
        Engineer's Motto: If it aint broke take it apart and fix it

        "If at 1st you don't succeed... call it version 1.0"

        "Half of Programming is coding"....."The other 90% is DEBUGGING"

        "Document my code????" .... "WHYYY??? do you think they call it CODE? "

        Comment

        Working...
        X