Zibit Posted February 11, 2010 Share Posted February 11, 2010 (edited) k... i know im asking too much but how difficult is an updater...i want my program to compare 2 folders (with subfolders) and if few files in folder 1 doesnt match with folder 2, it copy's them into an new folder called patch... i'm working on a project... the folder has over 10000 files and over 50 subfolder's... Edited February 11, 2010 by Zibit Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
trancexx Posted February 11, 2010 Share Posted February 11, 2010 k... i know im asking too much but how difficult is an updater...i want my program to compare 2 folders (with subfolders) and if few files in folder 1 doesnt match with folder 2, it copy's them into an new folder called patch... i'm working on a project... the folder has over 10000 files and over 50 subfolder's...But, where is the question? Is it that part about updater? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Zibit Posted February 11, 2010 Author Share Posted February 11, 2010 (edited) how can i make a program what copies all the files what dont match between folder 1 and folder 2 to another folder... sofar i figured out this: $search = FileFindFirstFile(@ScriptDir & "/dir1/*.*") $i = 0 FileDelete("files.tsf") ; Check if the search was successful _main() If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf func _main() while 1 $file = FileFindNextFile($search) $file_exist = FileExists(@ScriptDir & "/dir2/" & $file) $file_size = FileGetSize(@ScriptDir & "/dir1/" & $file) $file_size2 = FileGetSize($file_exist) if $file_size <> $file_size2 then FileWriteLine("files.tsf", $file & @CRLF) if $file_size <> $file_size2 then FileCopy(@ScriptDir & "/dir1/" & $file, @ScriptDir & "/patch/", 1) if $file_size <> $file_size2 then TrayTip("", "seems ok", 0) $i = $i +1 if @error then exit wend EndFunc ; Close the search handle FileClose($search) the problem is the folders has over 50 subfolders Edited February 11, 2010 by Zibit Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
JohnOne Posted February 11, 2010 Share Posted February 11, 2010 I cannot help you with any code, as I have not done this sort of thing before, but I can point you toward what I believe is the UDF you ought to be familiarizing yourself with, in order to better achieve your goal. _FileListToArray() AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Zibit Posted February 11, 2010 Author Share Posted February 11, 2010 well thx command is all i wanted ( to point me to right direction ) Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
Bert Posted February 11, 2010 Share Posted February 11, 2010 I've made something that will do what you want. PM me and I will send you the code. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Zibit Posted February 11, 2010 Author Share Posted February 11, 2010 k did well so long... but still something here... size's are coming in as 0 #Include <File.au3> #Include <Array.au3> $i = 0 ;Folder being examined $FileListFolder = _FileListToArray(@ScriptDir & "/serv/", "*", 2) ;List Of Folders $FileListFile = _FileListToArray(@ScriptDir & "/serv/", "*", 1) ;list of files in the folder $dir = $FileListFolder[$i] ;chooses dir ( made for altering value 1 to list ) $search = FileFindFirstFile(@ScriptDir & $dir & "/*.*") ;<---- u know what that is $main = $FileListFolder[0] ;for until FileDelete("files.tsf") _main() func _main() do $file = FileFindNextFile($search) ;searches files $file_size2 = FileGetSize(@ScriptDir & $FileListFile[$i] & $file) ;size of file 2 $file_size = FileGetSize(@ScriptDir & "/dir1/" & $file) ;size of file 1 if $file_size <> $file_size2 then FileWriteLine("files.tsf", $file & @CRLF) if $file_size <> $file_size2 then FileCopy(@ScriptDir & $dir & $file, @ScriptDir & "/patch/", 1) if $file_size <> $file_size2 then TrayTip("", "seems ok", 0) MsgBox(0, "", $file_size, 0) MsgBox(0, "", $file_size2, 0) $i = $i + 1 until $i = $main EndFunc FileClose($search) Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam Link to comment Share on other sites More sharing options...
MvGulik Posted February 11, 2010 Share Posted February 11, 2010 (edited) whatever Edited February 7, 2011 by MvGulik "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
Developers Jos Posted February 11, 2010 Developers Share Posted February 11, 2010 You need to do some debugging in stead of asking here to have things figured out for you. Use Ctrl+D on variables in SciTE and a automatic consolewrite is generate and then run your script. You will find something is missing in those values and it probably is missing some character somewhere. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zibit Posted February 11, 2010 Author Share Posted February 11, 2010 (edited) yeah jos i did... then i couldnt figure it out soo i came... but Mc thx very much although still comes up 0... Edited February 11, 2010 by Zibit Creator Of Xtreme DevelopersPixel Pattern UDFTray GUI UDFMathssend & recive register scriptMouse Control via Webcam 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