1. Malek Taha
  2. PowerBuilder
  3. Sunday, 16 July 2023 16:29 PM UTC

Hi

   In PB 2021 i am looking for an easy way to search a directory for specefic files for example file with a .reg extension and get the one with the earliest create date.

Any info on this topic will be helpful.

 

Thanks

Malek

John Raghanti Accepted Answer Pending Moderation
  1. Tuesday, 18 July 2023 11:23 AM UTC
  2. PowerBuilder
  3. # 1

You can create a ListBox control and use the DirList function that is built into PB.

ls_path = "c:\temp\*.reg"
lb_dir.DirList( ls_path, 0, st_dir)

 

 

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Sunday, 16 July 2023 21:02 PM UTC
  2. PowerBuilder
  3. # 2

Mike is right on track.

I've made a small sample app in the past that recursively scans (almost) all of my hard drives for any PBL files. You can easily adapt the code to search REG files.

It's made in PB 2019 R3.

There's a button that shows the Creation date, Modification date and Access date. I'm using OLE for that one, since I don't have time to figure out how to do it with API functions, but it's possible. Take a look at the PFC classes and search on "of_GetCreationDatetime" if you prefer to not use OLE.

See the attached zip file.

regards.

Attachments (1)
Comment
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Sunday, 16 July 2023 17:25 PM UTC
  2. PowerBuilder
  3. # 3
Comment
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.