tempman Posted September 23, 2008 Share Posted September 23, 2008 Hi, I am trying to write script which copy *.log files from dir1 to dir2 if *.log file size iz less then 50000 bites Link to comment Share on other sites More sharing options...
Andreik Posted September 23, 2008 Share Posted September 23, 2008 Hi, I am trying to write script which copy *.log files from dir1 to dir2 if *.log file size iz less then 50000 bitesThis should work: #include <File.au3> $DIR = FileSelectFolder("SELECT","") $SAVE_DIR = FileSelectFolder("SAVE","",1) $FILES = _FileListToArray($DIR,"*.TXT") For $INDEX = 1 To $FILES[0] $SOURCE = $DIR & "\" & $FILES[$INDEX] If FileGetSize($SOURCE) < 50000 Then FileCopy($SOURCE,$SAVE_DIR) EndIf Next When the words fail... music speaks. Link to comment Share on other sites More sharing options...
tempman Posted September 23, 2008 Author Share Posted September 23, 2008 (edited) Mulţumesc foarte mult Andreik!!! Edited September 23, 2008 by tempman Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now