Hollowyearz

_FileListToArray w/out ubound

Apr 9th, 2015
318
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 0.40 KB | None | 0 0
  1. #include <File.au3>
  2.  
  3. BulkRename()
  4.  
  5. Func BulkRename()
  6.     Local $sPath = "C:\Temp"
  7.     Local $aFolders = _FileListToArray($sPath, '*', $FLTA_FOLDERS, True)
  8.     If @error Then Return False ; If an error occurred
  9.  
  10.     Local $sSuffix = '_renamed'
  11.  
  12.     For $i = 1 To $aFolders[0]
  13.         ConsoleWrite($aFolders[0])
  14.         DirMove($aFolders[$i], $aFolders[$i] & $sSuffix)
  15.     Next
  16.     Return True
  17. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment