Jump to content

Search the Community

Showing results for tags 'filefindfirstfile'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 4 results

  1. Hello. I need to list only the folders that has a name composed of numbers only. How do I do this? OBS: I just posted the relevant content to the folder. Global $path = "G:\jobs\" For $i = 1 To $aArray[0] Local $search = FileFindFirstFile($path & $aArray[$i] & "\[0-9]" ) I tried with "\*.*" and it returns me the expected result, but the other doesn't.
  2. So I tried to get the first file of a folder with FileFindFirstFile but it always gives me a 1 as a value, so it tells me that the folder is empty. But the folder is not empty. Code: Local $path_times_text_01 = "D:\xxx\test\xxx\" Local $search = FileFindFirstFile($path_times_text_01 & "*.*") Timecheck() Func Timecheck() ConsoleWrite($search & @CRLF) If $search = -1 Then MsgBox(0, "Error", "could not find extension") Exit EndIf If $search = 1 Then MsgBox(0, "Fehler", "folder is empty") Exit EndIf ConsoleWrite($search & @CRLF) EndFuncThis does not make any sense to make because again the folders are not empty.
  3. The program is supposed to search for *.pst files, then copy the results to a server share. What am I doing wrong? It doesn't seem to be doing anything. $nMsg = GUIGetMsg() Switch $nmsg Case $bckuppst While 1 $pst1=FileFindFirstFile("*.pst") FileCopy($pst1, "\\majordc01\backups\" & @UserName, 8) $pst2=FileFindNextFile($pst1) FileCopy($pst2, "\\majordc01\backups\" & @UserName, 8) if @error then ExitLoop WEnd EndSwitch Thanks!
  4. Hello, Wondering if anyone has experienced unreliable returns from FileFindFirstFile. I have a script running from a WinPE environment that maps a network share then checks to see if the expected number of files with the same name pattern exist. The function below is called with "p:sharefile00*.bin", 10 There are exactly 10 files in the share named file001.bin, file002.bin... up to file0010.bin. The first time, the funtion immediately returns -1, but if I call it repeatedly with the exact same parameter values, it finally works. Func _VerifySpan($fpath, $fcount) $fc = 0 $fh = FileFindFirstFile($fpath) If $fh = -1 Then Return False ; First file not found While 1 $fn = FileFindNextFile($fh) If @error = 1 Then ExitLoop $fc = $fc + 1 WEnd FileClose($fh) If $fcount = $fc Then Return True Else Return False EndFunc
×
×
  • Create New...