R.L. Posted June 24, 2004 Share Posted June 24, 2004 (edited) I wrote it because it was very hard to find a small tool that would backup individual files (mostly configuration files) from different locations to one location (typically a: drive). The script may not be as skillfully put together as some would be able to do so, but the little thing does the trick, hope some might find it useful (AutoIt is awsome!). Suggestions are welcomed.Here is the script:http://www.autoitscript.com/fileman/users/public/RL/FileBackerUpper.au3Here is its home Little(File)BackerUpper HomePageHere is its screenshot (a bit different from the current version)Little (File) BackerUpper ScreenshotAnd here is the complied package (for full features and version history, please read the readme file in the package):FilebackerUpper062304b.zip Edited June 24, 2004 by R.L. R.L.A few pieces made with new GUI enabled AutoIt Link to comment Share on other sites More sharing options...
tutor2000 Posted June 24, 2004 Share Posted June 24, 2004 Kewl; I wrote one that backups from the date of your choice and goes backwards to the number of days you set. Wrote it in autoit2 though and uses atool Rick Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm Link to comment Share on other sites More sharing options...
emmanuel Posted June 24, 2004 Share Posted June 24, 2004 cool deal, though one file at a time? can't select a directory? "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
R.L. Posted June 24, 2004 Author Share Posted June 24, 2004 cool deal, though one file at a time? can't select a directory?I would love to make it being able to select multiple files at one time, but I still need to work it out with the file selection dialog box. Now, when I enable the feature to make multiple selections, the full paths of them are not captured. I may need to do some string manipulation in order to make it work. As for directories, I'm afraid not. This script was born exactly because one can so easily find freeware for backing up the whole directory (there are indeed numerious of them around), but almost none of them allow you to backup a list of individual files with different exts or from different directories. Hence, Little File BackerUpper it is (In fact, it is really not difficult to just write a few lines moving *.* or *.[ext] from one or several dirs to another, but that is not what this script is aiming at ). It would, however, be nice to be able to enter more than one files at a time. Will try to work on it - tips on codes are welcomed R.L.A few pieces made with new GUI enabled AutoIt Link to comment Share on other sites More sharing options...
tutor2000 Posted June 24, 2004 Share Posted June 24, 2004 cool deal, though one file at a time? can't select a directory?Actually the autoit does the date manipulation and a bat file using xcopy or xxcopy runs the app. So you can copy anything you want by setting it up in the bat. I use fileattrib +a and xcopy /m with some other switchesRick Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm Link to comment Share on other sites More sharing options...
emmanuel Posted June 24, 2004 Share Posted June 24, 2004 (edited) was just looking at the guts a bit, msgbox timeouts are in seconds, not miliseconds...MsgBox(64 + 0, "Backup canceled (timeout in 8 seconds) ", "Backup did not proceed due to user's cancel.", 8000) Edit: just killing two birds with one post... I'm working on another bit of backup code, for defining wild card strings to have xcopy do recursive backups on... I'll post it when I get to work... the idea is to easily get all the *.au3 files backed up from a whole directory tree at once, perhaps, if you like it, we could find a way to build it into your gui? Edited June 24, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
R.L. Posted June 24, 2004 Author Share Posted June 24, 2004 (edited) was just looking at the guts a bit, msgbox timeouts are in seconds, not miliseconds...MsgBox(64 + 0, "Backup canceled (timeout in 8 seconds) ", "Backup did not proceed due to user's cancel.", 8000)ooooops Thanks for catching this. Use the functon SLEEP too often and got the unit mixed up. I'm working on another bit of backup code, for defining wild card strings to have xcopy do recursive backups on... I'll post it when I get to work... the idea is to easily get all the *.au3 files backed up from a whole directory tree at once, perhaps, if you like it, we could find a way to build it into your gui?Sure, one more function of this wouldn't hurt Just in case some may wonder, my next goal is to build profile support, so users can call up different lists to backup Edited June 24, 2004 by R.L. R.L.A few pieces made with new GUI enabled AutoIt Link to comment Share on other sites More sharing options...
tutor2000 Posted June 24, 2004 Share Posted June 24, 2004 ooooops Thanks for catching this. Use the functon SLEEP too often and got the unit mixed up.Sure, one more function of this wouldn't hurt Just in case some may wonder, my next goal is to build profile support, so users can call up different lists to backup That's in my backup already although with au2I just used fileselect and ran the batch as a varRick Only $2.00 with Resale Rights How to Block Better for Martial Artists and NonMartial Artistshttp://kirkhamsebooks.com/MartialArts/Bloc...tterEbook_m.htm Link to comment Share on other sites More sharing options...
emmanuel Posted June 24, 2004 Share Posted June 24, 2004 (edited) ok, here it is, I'm sure to integrate it, you'd want to change the INI parts, replace them with your own. I'm using xcopy because it's got the handy recursing that I want... if FileExists("backup.ini") = 0 Then EditIni("backup.ini") EndIf $source = IniRead("backup.ini", "Config", "source","C:\") $dest = IniRead("backup.ini", "Config", "destination","C:\") $find = StringSplit(IniRead("backup.ini", "Config", "files", "*.au3,*.txt,*.bat"),",") for $i = 1 to $find[0] ;MsgBox(0, "testing",@ComSpec & " /c xcopy "& $source & "\" & $find[$i] & " " & $dest & " /i /e /h /Y /D") $val = RunWait(@ComSpec & ' /c xcopy "'& $source & "\" & $find[$i] & '" "' & $dest & '" /i /e /h /Y /D /Z',@TempDir);/i assumes target is directory, /e copies directories - including empties, /h includes system and hidden, /Y overwrites, /d copies only files that have a newer date than those at the destination. ;MsgBox(0, "Program returned with exit code:", $val) if $val = 0 Then ;files coppied ok Else ;it was bad EndIf Next Func EditIni($ini) IniWrite($ini, "Config", "files",InputBox("simple backup","Type the parts of filenames that you'd like backed up, comma seperated."& @LF &_ "You can use standard DOS wildcards", "*.au3, *.txt, *.bat" )) IniWrite($ini, "Config", "source", FileSelectFolder("select folder to backup, backup does recurse.", "",0)) IniWrite($ini, "Config", "destination", FileSelectFolder("Select drive or folder to copy files to.", "",1)) EndFunc ;==>EditIni Edited June 24, 2004 by emmanuel "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
emmanuel Posted June 24, 2004 Share Posted June 24, 2004 since au3checker was just updated, and I had your backerupper open, I checked it... there's a few errors you might want to look at: FileBackerUpper.au3(432,21) : ERROR: $S: undeclared global variable. $S = $S + "I'm not even supposed to be here today!" -Dante (Hicks) Link to comment Share on other sites More sharing options...
R.L. Posted June 25, 2004 Author Share Posted June 25, 2004 ok, here it is, I'm sure to integrate it, you'd want to change the INI parts, replace them with your own. I'm using xcopy because it's got the handy recursing that I want...Hey, thanks, will see how I am going to put it together in the next version and will post it here after I finished since au3checker was just updated, and I had your backerupper open, I checked it... there's a few errors you might want to look at: FileBackerUpper.au3(432,21) : ERROR: $S: undeclared global variable. $S = $S +Cool! You caught my leftovers (a variable I set out to have but didn't use) ; I wasn't aware of the checker, thanks, very neat feature! I cleaned up the script a bit and uploaded a new version (Following a suggestion from Jon in another thread, I use CASE SELECT for stating control function instead of IF, THEN : http://www.autoitscript.com/fileman/users/public/RL/filebackerupper.au3 R.L.A few pieces made with new GUI enabled AutoIt Link to comment Share on other sites More sharing options...
speedi Posted January 27, 2010 Share Posted January 27, 2010 ok, here it is, I'm sure to integrate it, you'd want to change the INI parts, replace them with your own. I'm using xcopy because it's got the handy recursing that I want... if FileExists("backup.ini") = 0 Then EditIni("backup.ini") EndIf $source = IniRead("backup.ini", "Config", "source","C:\") $dest = IniRead("backup.ini", "Config", "destination","C:\") $find = StringSplit(IniRead("backup.ini", "Config", "files", "*.au3,*.txt,*.bat"),",") for $i = 1 to $find[0] ;MsgBox(0, "testing",@ComSpec & " /c xcopy "& $source & "\" & $find[$i] & " " & $dest & " /i /e /h /Y /D") $val = RunWait(@ComSpec & ' /c xcopy "'& $source & "\" & $find[$i] & '" "' & $dest & '" /i /e /h /Y /D /Z',@TempDir);/i assumes target is directory, /e copies directories - including empties, /h includes system and hidden, /Y overwrites, /d copies only files that have a newer date than those at the destination. ;MsgBox(0, "Program returned with exit code:", $val) if $val = 0 Then ;files coppied ok Else ;it was bad EndIf Next Func EditIni($ini) IniWrite($ini, "Config", "files",InputBox("simple backup","Type the parts of filenames that you'd like backed up, comma seperated."& @LF &_ "You can use standard DOS wildcards", "*.au3, *.txt, *.bat" )) IniWrite($ini, "Config", "source", FileSelectFolder("select folder to backup, backup does recurse.", "",0)) IniWrite($ini, "Config", "destination", FileSelectFolder("Select drive or folder to copy files to.", "",1)) EndFunc ;==>EditIni I use xxcopy for mine, but I am having problems running on a Vista PC... Does xcopy work on a Vista PC? Thanks! Link to comment Share on other sites More sharing options...
James Posted January 27, 2010 Share Posted January 27, 2010 This thread is broken... Tag missing I think! Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ 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