Announcement

Collapse
No announcement yet.

CommentsOn: File or Folder List … posted code

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

    CommentsOn: File or Folder List … posted code

    Stores DIRDATA with file or folder. Get folders in one folder, or all sub-folders. Get files in one folder, or all sub-folders. Get various attributes. Sort on various attributes. Binary search for file or folder name. Optional user string for each item. To use test app, you have to provide the search values, hard drives vary.

    #2
    It should be tested before use.
    I did test, but a bit going on there.
    If anyone finds a problem, please let me know.
    LastAccessTime is worthless, if you get the list, that will be the LastAccessTime.

    Comment


      #3
      Originally posted by Stanley Durham View Post
      LastAccessTime is worthless, if you get the list, that will be the LastAccessTime.
      ??? DIR$() shouldn't affect LastAccessTime. That is always the time something was last done with the file

      However, if you do something else with the directory (such as open it in Explorer) , your AV is likely to scan any risky files there such as executables and their LastAccess will be updated
      =========================
      https://camcopng.com
      =========================

      Comment


        #4
        > ??? DIR$() doesn't affect LastAccessTime. That is always the time the file was last opened or closed.
        Might be something wrong with the way I used it. I’ll take a look.

        Comment


          #5
          Just a suggestion: Your primary drive(s) are likely to be NTFS, so filetimes will be UTC.
          You may llike to consider converting to local time for display purposes::
          Code:
          FOR x = 1 TO FListCount(list)
              pt.FileTime = FListGetCreationTime(list, x)
              pt.ToLocalTime
             SS FORMAT$(x) +": "+ $DQ + FListGetName(list, x) + $DQ + " ....... CreationTime: " + pt.DateStringLong() + ", " + pt.TimeString24()
          NEXT x​
          etc
          =========================
          https://camcopng.com
          =========================

          Comment


            #6
            I just deleted LastAccessTime.
            It had a problem.
            Not something I’d use anyway.
            The main thing is LastWriteTime.

            Comment


              #7
              Originally posted by Stanley Durham View Post
              > ??? DIR$() doesn't affect LastAccessTime. That is always the time the file was last opened or closed.
              Might be something wrong with the way I used it. I’ll take a look.
              Note my addition to my previous post
              =========================
              https://camcopng.com
              =========================

              Comment


                #8
                > You may llike to consider convert t local time for display purposes::
                The display is up to the user.
                The functions just return a Quad.
                I don’t won’t to mess with it unless there’s an error.
                Thanks…

                Comment

                Working...
                X
                😀
                🥰
                🤢
                😎
                😡
                👍
                👎