Consulting

Results 1 to 2 of 2

Thread: Problem about Loop through files sort by Date.

  1. #1

    Problem about Loop through files sort by Date.

    Hello everyone!

    first off thanks for any help.


    im using the below code to loop through files but it automatically loops through the files alphabetically, is it possible to modify such that the loop is sorted by Date modified (earliest first)?


    thanks


    MyFile = Dir(MyPath)Do While MyFile <> "" 
     'do stuffs
    MyFile = Dir 
    Loop
    Formatting tags added by mark007
    Chúng tôi cộng đồng internet việt nam website https://internetvietnam.net/https://dulichviet.net.vn/https://jobs.drupal.org/company/15207 sự lựa chọn tốt nhất khi khách hàng một cách hiệu quả.

  2. #2
    Knowledge Base Approver VBAX Wizard
    Joined
    Apr 2012
    Posts
    5,646
    sn=split(createobject("wscript.shell").exec("cmd /c dir ""G:\OF\*.*"" /b/s/od").stdout.readall,vbcrlf)

Posting Permissions

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