Jump to content

Search the Community

Showing results for tags 'filelisttoarrayrec'.



More search options

  • 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


Location


WWW


Interests

Found 2 results

  1. Greetings! I am in need of listing several files in a folder with its respective sizes. I found this script online, which works fine. However I'd like to insert the folder path as a variable in a dialog box. How can I replace @ScriptDir with my variable? Thanks in advance. $z = MsgBox(0,"Selected Folder",FileSelectFolder ( "Select Folder", "C:\")) ; THE VARIABLE I'D LIKE TO INCLUDE. #include <File.au3> #include <Array.au3> Local $aArray = _FileListToArrayRec(@ScriptDir, "*", $FLTAR_SORT, $FLTAR_FILES) ; ;~ _ArrayDisplay($aArray, "Sorted tree") Local $size_A[UBound($aArray)][2] For $i = 1 To UBound($aArray) -1 $size_A[$i][0] = $aArray[$i] $size_A[$i][1] = ByteSuffix(FileGetSize($aArray[$i])) Next ;~ _ArrayDisplay($size_A) _FileWriteFromArray(@ScriptDir & '\Tamanho.txt', $size_A, 1, Default, ' ') ShellExecute(@ScriptDir & '\Tamanho.txt') Func ByteSuffix($Bytes) Local $Index = 0, $aArray = [' bytes', ' KB', ' MB', ' GB', ' TB', ' PB', ' EB', ' ZB', ' YB'] While $Bytes > 1023 $Index += 1 $Bytes /= 1024 WEnd Return Round($Bytes, 2) & $aArray[$Index] EndFunc ;==>ByteSuffix
  2. $text = 'C:\xxx\hh\hhhh\hhh\image.JPG' $out = StringRegExp($text,'.*\\(.*)\\',1) Return the last folder hhh. I would use this expression in the cycle below. Local $aArray = _FileListToArrayRec("C:\test\app", "*app.exe", $FLTAR_FILES, 1, $FLTAR_SORT,$FLTAR_FULLPATH) $fileArray = UBound($aArray) -1 For $y = 1 To $fileArray _GUICtrlListView_AddItem($ListView, StringRegExp($aArray[$y],'.*\\(.*)\\',1), 0) Next My target is to remove everything from the path, and take only the last folder. Thanks
×
×
  • Create New...