Last active
March 5, 2019 19:30
-
-
Save jasp402/4809648a061b55369c6cf7e857d4a1fa to your computer and use it in GitHub Desktop.
AutoIt: Move files source and destination with complete path
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <File.au3> | |
#include <Array.au3> | |
#include <WinAPIFiles.au3> | |
#include <FileConstants.au3> | |
HotKeySet("{ESC}", "Terminate") | |
;~ --------------------------------- | |
Global $listFile = "Y:\FileNameTif.txt" ;TIFF y TIFF | |
Global $orig = "Y:\TIF\" ; SOLO TIF | |
Global $dest = "Y:\_RESULT\" | |
Local $aArray = FileReadToArray($listFile) | |
Local $iLineCount = @extended | |
If @error Then | |
MsgBox($MB_SYSTEMMODAL, "", "There was an error reading the file. @error: " & @error) | |
Else | |
For $i = 0 To $iLineCount - 1 | |
ConsoleWrite($aArray[$i]&@CRLF) | |
FileMove($orig&$aArray[$i], $dest&$aArray[$i], $FC_OVERWRITE + $FC_CREATEPATH) | |
If @error Then | |
ConsoleWriteError('ERROR Copy:'&@error&@CRLF) | |
EndIf | |
Next | |
EndIf | |
;~ --------------------------------- | |
Func Terminate() | |
Exit | |
EndFunc ;==>Terminate |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment