SPONSORS:






User Tag List

Results 1 to 7 of 7
  1. #1
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to retrieve lastest folder created?

    Under a folder, there are a couple of subfolders. Does anybody know how I can retrieve the subfolder that was created last?

  2. #2
    Guest

    Re: How to retrieve lastest folder created?

    From the code below, use dtCreationTime or dtLastModifyTime & write code to get the latest created/modified directory.


  3. #3
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to retrieve lastest folder created?

    Thanks for the GetDirContents. But I am not exactly sure how to get the folder that has the latest date. Do you do a datetime compare of the first 2 folders, then store the folder with the latest time, and compare that to the next folder, and go till the very end folder?

    ------------------

  4. #4
    Guest

    Re: How to retrieve lastest folder created?

    Yes. I would compare the dates. See the following code. You might want to use different comparison mechanisms for more reliability. These functions doesn't go recursive to get latest folder.


  5. #5
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to retrieve lastest folder created?

    Thanks. That worked just fine!!!

    Ok, that was for one folder. How about finding two folders that was most recently modified?

    [This message has been edited by kchan (edited 10-22-2002).]

  6. #6
    Member
    Join Date
    Jun 2001
    Location
    Bedford, MA, USA
    Posts
    85
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to retrieve lastest folder created?

    The attached function returns the names of the subdirectories in the specified directory, ordered by creation date - most recent 1st.

    Hope this helps.
    -Jim

    ------------------

  7. #7
    Member
    Join Date
    Sep 2002
    Location
    Foster City, CA, USA
    Posts
    55
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to retrieve lastest folder created?

    Thank you both!!! These are extemely helpful and useful in different circumstances. They will provide me with flexibility in my testing. I really appreciate it. Thanks.

 

 

Posting Permissions

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

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 03:56 PM.

Copyright BetaSoft Inc.