carabusu Posted September 25, 2008 Share Posted September 25, 2008 I have a folder with a lot of subfolders and i need to find out which is the last created subfolders. Tnx Link to comment Share on other sites More sharing options...
d4rk Posted September 25, 2008 Share Posted September 25, 2008 i have a fast look in the function list and seem like there's no Foldergettime(), but as my personal view, you can use _Filelisttoarray() to list all subfolder, save them then use it to compare later the new will not be in the list [quote]Don't expect for a perfect life ... Expect a least troubles ones[/quote]Contact me : ass@kiss.toWhat I Have Done :Favorites Manager Mangage your favorite's folder, that's coolPC Waker For those who want to save stickersWebScipts Supporter For those who've just started with Web and WebScriptsTemporary Looker Simple but powerful to manage your Temporary folder, you know what you downloaded[UDF] _NumberFormat() Better performance on number display[UDF] _DirGet() What a folder contain [how many (hidden,normal,...) files], with one line of code[UDF] _IsPressEs() Just like _IsPress() but for a group of keys Link to comment Share on other sites More sharing options...
KaFu Posted September 25, 2008 Share Posted September 25, 2008 Use my tool SMF, search for folders only and retrieve the created time from search. Best Regards OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2024-Oct-20) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16) Link to comment Share on other sites More sharing options...
carabusu Posted September 25, 2008 Author Share Posted September 25, 2008 i have a fast look in the function list and seem like there's no Foldergettime(), but as my personal view, you can use _Filelisttoarray() to list all subfolder, save them then use it to compare laterthe new will not be in the listTnx a lot, its working Link to comment Share on other sites More sharing options...
DssTrainer Posted February 26, 2009 Share Posted February 26, 2009 Here's a bit of code I use for that: Func _NewestDir($sPath, $Flag=0) If Not FileExists($sPath) Then Return SetError(1, 0, -1) If Not StringInStr(FileGetAttrib($sPath), "D") Then Return SetError(2, 0, -1) Local $dList = _FileListToArray($sPath, "*", 2) if not IsArray($dList) then msgbox (0, "Error", "Could not get folderlist from " & $sPath) Return endif If Ubound($dList) > 1 Then Local $NewstDir = $dList[1], $GetNewstDirTime = 0, $GetDirTime, $iArr For $iArr = 1 To $dList[0] $GetDirTime = FileGetTime($sPath & "\" & $dList[$iArr], $Flag, 1) If $GetDirTime > $GetNewstDirTime Then $NewstDir = $dList[$iArr] $GetNewstDirTime = FileGetTime($sPath & "\" & $NewstDir, $Flag, 1) Next Return $NewstDir Else Return SetError(1, 0, -2) EndIf EndFunc Use $Flag to indicate which timestamp 0 = Modified (default) 1 = Created 2 = Accessed Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now