#336 closed Feature Request (Rejected)
Add DirGetTime function
Reported by: | fherrero@… | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | Severity: | None | |
Keywords: | Cc: |
Description
I think a good idea add DirGetTime function.
I need this and "simulated" by this code:
Func DirGetTime ($path, $option = 0, $format = 0)
Local $FSO = ObjCreate("Scripting.FileSystemObject")
Local $Folder = $FSO.GetFolder($path)
Local $date
Switch $option
Case 0
$date = $Folder.DateLastModified()
Case 1
$date = $Folder.DateCreated()
Case Else
$date = $Folder.DateLastAccessed()
EndSwitch
If $format = 0 Then
$date = StringRegExp($date, "(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})", 1)
EndIf
Return $date
EndFunc
Attachments (0)
Change History (8)
comment:1 Changed 17 years ago by Valik
- Resolution set to Rejected
- Status changed from new to closed
comment:2 follow-up: ↓ 4 Changed 17 years ago by fherrero@…
I try this first and not work... bug?
comment:4 in reply to: ↑ 2 ; follow-up: ↓ 5 Changed 17 years ago by Valik
Replying to fherrero@noticiasdenavarra.com:
I try this first and not work... bug?
Ask on the forum. You are probably making a mistake by placing a trailing slash on the path or something.
comment:5 in reply to: ↑ 4 ; follow-up: ↓ 6 Changed 17 years ago by anonymous
Replying to Valik:
Replying to fherrero@noticiasdenavarra.com:
I try this first and not work... bug?
Ask on the forum. You are probably making a mistake by placing a trailing slash on the path or something.
OK, I tryed MsgBox(0, "hola", FileGetTime("e:\_", 1, 1)) and works but MsgBox(0, "hola", FileGetTime("e:\_\", 1, 1)) not work
In my experience with VBS and php when dealing with directories like whether they gave the last slash or not
comment:6 in reply to: ↑ 5 ; follow-up: ↓ 7 Changed 17 years ago by Valik
Replying to anonymous:
OK, I tryed MsgBox(0, "hola", FileGetTime("e:\_", 1, 1)) and works but MsgBox(0, "hola", FileGetTime("e:\_\", 1, 1)) not work
In my experience with VBS and php when dealing with directories like whether they gave the last slash or not
This isn't VBS or PHP, this is AutoIt. Do what AutoIt expects, not what other languages expect.
comment:7 in reply to: ↑ 6 Changed 17 years ago by fherrero@…
Replying to Valik:
This isn't VBS or PHP, this is AutoIt. Do what AutoIt expects, not what other languages expect.
Of course this is AutoIt, but is usually indifferent to refer to directories with or without slash end ... is what is commonly expected.
My reference to VB or PHP were just examples of what I say.
I do not know the difficulty of modifying the function FileGetTime to act in this way, but much help to developers.
Thank you for your attention and help.
comment:8 Changed 17 years ago by fherrero@…
Last one: in the documentation makes no reference to the function is valid for directories nor specifies that the names of the directories have to go without the slash final.
http://www.autoitscript.com/autoit3/docs/functions/FileGetTime.htm
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
FileGetTime() works on directories. Closing as Rejected.