Tiger 0 Posted September 2, 2007 Move Files and Dirs from A to B expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.7.1 Author: Tiger Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Example Move("C:\Test", "D:\Test") Func Move($s_target, $e_target, $flag = 0) If Not StringInStr(StringRight($s_target, 1), "\") Then $s_target = $s_target & "\" If Not StringInStr(StringRight($e_target, 1), "\") Then $e_target = $e_target & "\" $ffff = FileFindFirstFile($s_target & "*") While 1 $ffnf = FileFindNextFile($ffff) If @error Then ExitLoop ; Dir If StringInStr(FileGetAttrib($s_target & $ffnf), "D") Then DirMove($s_target & $ffnf, $e_target & $ffnf, $flag) ; File Else FileMove($s_target & $ffnf, $e_target & $ffnf, $flag) EndIf WEnd ; Close Search FileClose($ffff) EndFunc ;==>MoveMove.au3 My UDFs:- _RegEnumKey Share this post Link to post Share on other sites
jvanegmond 307 Posted September 2, 2007 You can move entire directories using DirMove without any problems. There is no need to move each file inside the directory seperately. github.com/jvanegmond Share this post Link to post Share on other sites
SleepyXtreme 0 Posted September 3, 2007 fyi, this is a little useless Share this post Link to post Share on other sites