gius

$FT_CREATED and $FT_ACCESSED

15 posts in this topic

Hello everyone,

In this topic

'?do=embed' frameborder='0' data-embedContent>>

I found a code (Belini member) that searches files in a very fast

#include <String.au3>
#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>




global $listing
$directory = @DesktopDir

list($directory, 0)
time()
Func list($path = "", $counter = 0)

$counter = 0
$path &= '\'
Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')

If $demand_file = -1 Then Return ''
While 1
  $file = FileFindNextFile($demand_file)

  If @error Then ExitLoop
  If @extended Then
   If $counter >= 10 Then ContinueLoop
   list($path & $file, $counter + 1 )

  Else
            $listing &= $path & $file & "|"
  EndIf
WEnd
FileClose($demand_file)
EndFunc


func time()

$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)
;_ArrayDisplay($listing, "File")
_FileCreate(@ScriptDir & "\result.txt")
_FileWriteFromArray(@ScriptDir & "\result.txt",$listing)
endfunc

I can not understand
the function
where add

FileSetTime

$FT_CREATED $FT_ACCESSED

$aTime_Mod = FileGetTime($sFile, $FT_MODIFIED)    
     $aTime_Created = FileGetTime($sFile, $FT_CREATED) 
    
     $aResult[$i][1] = $aTime_Mod[0] & "/" & $aTime_Mod[1] & "/" & $aTime_Mod[2] & " [" & $aTime_Mod[3] & ":" & $aTime_Mod[4] & ":" & $aTime_Mod[5] & "]"
     $aResult[$i][2] = $aTime_Created[0] & "/" & $aTime_Created[1] & "/" & $aTime_Created[2] & " [" & $aTime_Created[3] & ":" & $aTime_Created[4] & ":" & $aTime_Created[5] & "]"

I think that the right function is $list_files
maybe within FOR - NEXT?

thanks

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Both of those variables are self explained in the function's, FileGetTime(), Parameter Section of the Help File:

 

 filename:The path to the file or directory to check.

option: [optional] Flag to indicate which timestamp
    $FT_MODIFIED (0) = Last modified (default)
    $FT_CREATED (1) = Created
    $FT_ACCESSED (2) = Last accessed 

Constants are defined in FileConstants.au3

format: [optional] to specify type of return
    0 = return an array (default)
    1 = return a string YYYYMMDDHHMMSS

Edited by Realm

My Contributions: Unix Timestamp: Calculate Unix time, or seconds since Epoch, accounting for your local timezone and daylight savings time. RegEdit Jumper: A Small & Simple interface based on Yashied's Reg Jumper Function, for searching Hives in your registry.  

Share this post


Link to post
Share on other sites

yes Realm,
I am confused, it is FileGetTime()
but do not know how to add this code

$aTime_Mod = FileGetTime($sFile, $FT_MODIFIED)    
$aTime_Created = FileGetTime($sFile, $FT_CREATED) 
    
$aResult[$i][1] = $aTime_Mod[0] & "/" & $aTime_Mod[1] & "/" & $aTime_Mod[2] & " [" & $aTime_Mod[3] & ":" & $aTime_Mod[4] & ":" & $aTime_Mod[5] & "]"
$aResult[$i][2] = $aTime_Created[0] & "/" & $aTime_Created[1] & "/" & $aTime_Created[2] & " [" & $aTime_Created[3] & ":" & $aTime_Created[4] & ":" & $aTime_Created[5] & "]"

in the first code.
Anyone can help me?

Thanks

Share this post


Link to post
Share on other sites

I guess I am wondering why you have used the AutoIt UDF _FileListToArrayRec function?


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

Guinnes,

Maybe I was wrong to use the _FileListToArrayRec

I would like to have in the list the file creation date and the last modification of the file,
with the format, for example:
14.03.2015 [17:10:46]

can anyone help me?

thanks

Share this post


Link to post
Share on other sites

Whoops, I meant haven't not have. As for your "issue", your code should be place in the else part of that code...

If $counter >= 10 Then ContinueLoop
   list($path & $file, $counter + 1 )

  Else
; PLACE THE CODE AROUND ABOUT HERE.
            $listing &= $path & $file & "|"
  EndIf

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

I really don't understand how Belini's code works for you, as it doesn't for me. As I said, check the help file for _FileListToArrayRec().

Edit: Now it does, but still..

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

The code is this:

#include <String.au3>
#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>




global $listing
$directory = @DesktopDir

list($directory, 0)
time()
Func list($path = "", $counter = 0)

$counter = 0
$path &= '\'
Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')

If $demand_file = -1 Then Return ''
While 1
  $file = FileFindNextFile($demand_file)

  If @error Then ExitLoop
  If @extended Then
   If $counter >= 10 Then ContinueLoop
   list($path & $file, $counter + 1 )

  Else
            $listing &= $path & $file & "|"
  EndIf
WEnd
FileClose($demand_file)
EndFunc


func time()

$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)
;_ArrayDisplay($listing, "File")
_FileCreate(@ScriptDir & "\result.txt")
_FileWriteFromArray(@ScriptDir & "\result.txt",$listing)
endfunc

I have a little changed.

 

I wish to file result.txt

_FileWriteFromArray (ScriptDir & "\ Result.txt", listing $)


there is also an indication the file creation date and the last modification of the file,
with the format for example:
14.03.2015 [17:10:46]


I've added this but does not work

$listing = FileGetTime($sFile, $FT_MODIFIED)    
$listing = FileGetTime($sFile, $FT_CREATED)

where I am wrong?
 

thanks

Share this post


Link to post
Share on other sites

; You didn't really change anything major
; Change this >>>>
$listing &= $path & $file & "|"
; to SOMETHING LIKE this >>>>
$listing &= $path & $file & "[" FileGetTime($path & $file, $FT_MODIFIED, 1)   & "]|"

You will need to edit to the format you have proposed. If you don't know how to then read the help thoroughly, as this is the process of learning.


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

I have just started studying AutoIt, it is difficult for me to understand how to do it.

guinness,
I put your added

$listing &= $path & $file & "[" FileGetTime($path & $file, $FT_MODIFIED, 1)   & "]|"

with all the code

#include <String.au3>
#include <Array.au3>
#include <File.au3>
#include <MsgBoxConstants.au3>




global $listing
$directory = @DesktopDir

list($directory, 0)
time()
Func list($path = "", $counter = 0)

$counter = 0
$path &= '\'
Local $list_files = '', $file, $demand_file = FileFindFirstFile($path & '*')

If $demand_file = -1 Then Return ''
While 1
  $file = FileFindNextFile($demand_file)

  If @error Then ExitLoop
  If @extended Then
   If $counter >= 10 Then ContinueLoop
   list($path & $file, $counter + 1 )

  Else
          $listing &= $path & $file & "[" FileGetTime($path & $file, $FT_MODIFIED, 1)   & "]|"
  EndIf
WEnd
FileClose($demand_file)
EndFunc


func time()

$listing = StringTrimRight($listing, 1)
$listing = _StringExplode($listing, "|", 0)
_ArraySort($listing)
_FileCreate(@ScriptDir & "\result.txt")
_FileWriteFromArray(@ScriptDir & "\result.txt",$listing)
endfunc

but it does not work, it gives me this error:

  ==> Error in expression.:
$listing &= $path & $file & "[" FileGetTime($path & $file, $FT_MODIFIED, 1)   & "]|"
$listing &= ^ ERROR

 

I have done something wrong?

How I can add
$ FT_CREATED and the date format 03.14.2015 [17:10:46]?

thanks

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

Here...I re-wrote that code so there is no need for a global variable.

#include <Date.au3>
#include <WinAPIFiles.au3>

Global Const $GETFILES_FT_DEFAULT = '1970/01/01 00:00:00'
Global Const $GETFILES_FT_PATTERN = '(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})'
Global Const $GETFILES_FT_REPLACE = '$1/$2/$3 $4:$5:$6'
Global Const $GETFILES_FT_STRING = 1
Global Enum Step *2 $GETFILES_NOT_DIRECTORY, $GETFILES_NOT_EXISTS ; GetFiles @error

Example()

Func Example()
    Local $sFileList = ''
    GetFiles($sFileList, @DesktopDir) ; This uses no global variable
    If @error Then
        ConsoleWrite("Error: Check the enumeration above that matches the error code = " & @error & @CRLF)
    Else
        $sFileList = StringReplace($sFileList, '|', @CRLF) ; Replace the pipe char for @CRLF
        ConsoleWrite($sFileList & @CRLF)
    EndIf
EndFunc   ;==>Example

; By guinness on 2015/03/15. Idea by Belini and every AutoIt user who has done file searching.
Func GetFiles(ByRef $sFileList, $sFilePath, $iDateFormat = 0)
    Local Static $iCounter = 0

    $sFilePath = _WinAPI_PathAddBackslash($sFilePath) ; Add backslash
    If _WinAPI_PathIsDirectory($sFilePath) <> $FILE_ATTRIBUTE_DIRECTORY Then
        Return SetError($GETFILES_NOT_DIRECTORY, 0, '')
    EndIf

    Local $hFileFind = FileFindFirstFile($sFilePath & '*')
    If $hFileFind = -1 Then ; File not found
        Return SetError($GETFILES_NOT_EXISTS, 0, '')
    EndIf

    Local $sCreated = '', $sFileName = '', $sModified = ''
    While True
        $sFileName = FileFindNextFile($hFileFind)
        If @error Then
            ExitLoop
        EndIf
        If @extended Then ; Is directory.
            $iCounter += 1 ; Used for recursion level
            GetFiles($sFileList, $sFilePath & $sFileName)
            $iCounter -= 1 ; Used for recursion level
        Else
            $sCreated = FileGetTime($sFilePath & $sFileName, $FT_CREATED, $GETFILES_FT_STRING)
            $sCreated = _DateTimeFormat(@error ? $GETFILES_FT_DEFAULT : StringRegExpReplace($sCreated, $GETFILES_FT_PATTERN, $GETFILES_FT_REPLACE), $iDateFormat)

            $sModified = FileGetTime($sFilePath & $sFileName, $FT_MODIFIED, $GETFILES_FT_STRING)
            $sModified = _DateTimeFormat(@error ? $GETFILES_FT_DEFAULT : StringRegExpReplace($sModified, $GETFILES_FT_PATTERN, $GETFILES_FT_REPLACE), $iDateFormat)

            $sFileList &= $sFilePath & $sFileName & ' [Modified: ' & $sModified & ', Created: ' & $sCreated & ']|'
        EndIf
    WEnd
    FileClose($hFileFind)

    If $iCounter = 0 Then ; First recursion level, therefore strip pipe char
        $sFileList = StringTrimRight($sFileList, StringLen('|'))
    EndIf
EndFunc   ;==>GetFiles

This is recursive file searching, but I would still consider looking at the beta version of _FileListToArrayRec().

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

guinness,

Your code works very well and it's really fast,

thanks for everything

Share this post


Link to post
Share on other sites

Okay, but is that the output you wanted? Is it easy for you change?


_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

guinness,

It is this the result I was looking for.
It is easy to modify,
I have already changed

;ConsoleWrite($sFileList & @CRLF)
FileWrite(@ScriptDir & "\result.txt",$sFileList)

your explanations in the code they are very clear,
is really  a great work
thanks again

Share this post


Link to post
Share on other sites

#15 ·  Posted (edited)

No problem. Please mark the post that helped you as answered.

Edit: IMHO code doesn't need to be commented if variable names are clear and the code is structured in a clean and readable format.

Edited by guinness

_AdapterConnections()_AlwaysRun()_AppMon()_AppMonEx()_BinaryBin()_CheckMsgBox()_CmdLineRaw()_ContextMenu()_ConvertLHWebColor()/_ConvertSHWebColor()_DesktopDimensions()_DisplayPassword()_DotNet_Load()/_DotNet_Unload()_Fibonacci()_FileCompare()_FileCompareContents()_FileNameByHandle()_FilePrefix/SRE()_FindInFile()_GetBackgroundColor()/_SetBackgroundColor()_GetConrolID()_GetCtrlClass()_GetDirectoryFormat()_GetDriveMediaType()_GetFilename()/_GetFilenameExt()_GetHardwareID()_GetIP()_GetIP_Country()_GetOSLanguage()_GetSavedSource()_GetStringSize()_GetSystemPaths()_GetURLImage()_GIFImage()_GoogleWeather()_GUICtrlCreateGroup()_GUICtrlListBox_CreateArray()_GUICtrlListView_CreateArray()_GUICtrlListView_SaveCSV()_GUICtrlListView_SaveHTML()_GUICtrlListView_SaveTxt()_GUICtrlListView_SaveXML()_GUICtrlMenu_Recent()_GUICtrlMenu_SetItemImage()_GUICtrlTreeView_CreateArray()_GUIDisable()_GUIImageList_SetIconFromHandle()_GUIRegisterMsg()_GUISetIcon()_Icon_Clear()/_Icon_Set()_IdleTime()_InetGet()_InetGetGUI()_InetGetProgress()_IPDetails()_IsFileOlder()_IsGUID()_IsHex()_IsPalindrome()_IsRegKey()_IsStringRegExp()_IsSystemDrive()_IsUPX()_IsValidType()_IsWebColor()_Language()_Log()_MicrosoftInternetConnectivity()_MSDNDataType()_PathFull/GetRelative/Split()_PathSplitEx()_PrintFromArray()_ProgressSetMarquee()_ReDim()_RockPaperScissors()/_RockPaperScissorsLizardSpock()_ScrollingCredits_SelfDelete()_SelfRename()_SelfUpdate()_SendTo()_ShellAll()_ShellFile()_ShellFolder()_SingletonHWID()_SingletonPID()_Startup()_StringCompact()_StringIsValid()_StringRegExpMetaCharacters()_StringReplaceWholeWord()_StringStripChars()_Temperature()_TrialPeriod()_UKToUSDate()/_USToUKDate()_WinAPI_Create_CTL_CODE()_WinAPI_CreateGUID()_WMIDateStringToDate()/_DateToWMIDateString()Au3 script parsingAutoIt SearchAutoIt3 PortableAutoIt3WrapperToPragmaAutoItWinGetTitle()/AutoItWinSetTitle()CodingDirToHTML5FileInstallrFileReadLastChars()GeoIP databaseGUI - Only Close ButtonGUI ExamplesGUICtrlDeleteImage()GUICtrlGetBkColor()GUICtrlGetStyle()GUIEventsGUIGetBkColor()Int_Parse() & Int_TryParse()IsISBN()LockFile()Mapping CtrlIDsOOP in AutoItParseHeadersToSciTE()PasswordValidPasteBinPosts Per DayPreExpandProtect GlobalsQueue()Resource UpdateResourcesExSciTE JumpSettings INISHELLHOOKShunting-YardSignature CreatorStack()Stopwatch()StringAddLF()/StringStripLF()StringEOLToCRLF()VSCROLLWM_COPYDATAMore Examples...

Updated: 04/09/2015

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now