Modify

Opened 18 years ago

Closed 18 years ago

Last modified 18 years ago

#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 by Valik, 18 years ago

Resolution: Rejected
Status: newclosed

FileGetTime() works on directories. Closing as Rejected.

comment:2 by fherrero@…, 18 years ago

I try this first and not work... bug?

comment:3 by TicketCleanup, 18 years ago

Version: 3.2.12.0

Automatic ticket cleanup.

in reply to:  2 ; comment:4 by Valik, 18 years ago

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.

in reply to:  4 ; comment:5 by anonymous, 18 years ago

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

in reply to:  5 ; comment:6 by Valik, 18 years ago

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.

in reply to:  6 comment:7 by fherrero@…, 18 years ago

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 by fherrero@…, 18 years ago

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

Modify Ticket

Action
as closed The ticket will remain with no owner.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.