kingooo Posted January 8, 2011 Share Posted January 8, 2011 i want to make portable tool that copy all files in desktop-my documents-other partions & favorite and save this files in archive file. after format when you press double click in this file automatically extract all files that already exist in pc #RequireAdmin Opt("TrayMenuMode",1) DirCopy(@DesktopDir,$ANS&"\" &"kingooo/DesktopDir" & "",1) DirCopy(@MyDocumentsDir,$ANS&"\" &"kingooo/MyDocumentsDir" & "",1) DirCopy(@FavoritesDir,$ANS&"\" &"kingooo/FavoritesDir" & "",1) but really i am not happy because last codes do not make tool that save all file in archive file you can use next codes to reach us good result $Folder = "BackUp" $Archiv = "BackUp.rar" #Include <File.au3> $Files = _FileListToArray ($Folder,"*",1) $FileLest = "" FOr $d = 1 To $Files[0] $FileLest = $FileLest &" " & $Folder & "\" & $Files[$d] Next RunWait ("Rar.exe a " & $Archiv & $FileLest) Rar.exe a <Archive> <FIles> MsgBox (0,"","ok) ;RunWait ("Rar.exe X " & $Archiv & " " & $Folder) ;Rar.exe X <Archive> <Extract To..> MsgBox (0,"","ok") Link to comment Share on other sites More sharing options...
PsaltyDS Posted January 8, 2011 Share Posted January 8, 2011 you can use next codes to reach us good resultHow about if you use that code to reach your own good result. What was the question? How to run a command line compression utility?Check out Run() in the help file. If you can't make it work, post exactly what you tried. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
ripdad Posted January 8, 2011 Share Posted January 8, 2011 (edited) You don't need all that code. Rar will do it for you! If Not FileExists(@ScriptDir & '\BackUp') Then DirCreate(@ScriptDir & '\BackUp') Local $RarExe = @ProgramFilesDir & '\Winrar\Rar.exe' Local $Archive = '"' & @ScriptDir & '\BackUp\BackUp.rar' & '"' Local $Folder1 = '"' & @MyDocumentsDir & '"' Local $Folder2 = '"' & @FavoritesDir & '"' Local $Folder3 = '"' & @DesktopDir & '"' Local $Folders = $Folder1 & ' ' & $Folder2 & ' ' & $Folder3 RunWait($RarExe & ' a -r ' & $Archive & ' ' & $Folders) -edit1- oops, was working with an already existing folder. added FileExists(), DirCreate() -edit2- one more amendment. string together folders for one call to Rar. Edited January 8, 2011 by ripdad "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
MvGulik Posted January 9, 2011 Share Posted January 9, 2011 (edited) Your post is empty Edited February 12, 2011 by iEvKI3gv9Wrkd41u "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...
kingooo Posted January 9, 2011 Author Share Posted January 9, 2011 What was the question? i want make tool that save all files in my document, desktop ,other partions in folder such ashttp://www.mediafire.com/?39a4vbjrannds6band i can take this archive file in flash storage and after format i can recover all my files that stored in that folder when i press that archive filehttp://www.mediafire.com/?39a4vbjrannds6b Link to comment Share on other sites More sharing options...
kingooo Posted January 9, 2011 Author Share Posted January 9, 2011 You don't need all that code. Rar will do it for you! If Not FileExists(@ScriptDir & '\BackUp') Then DirCreate(@ScriptDir & '\BackUp') Local $RarExe = @ProgramFilesDir & '\Winrar\Rar.exe' Local $Archive = '"' & @ScriptDir & '\BackUp\BackUp.rar' & '"' Local $Folder1 = '"' & @MyDocumentsDir & '"' Local $Folder2 = '"' & @FavoritesDir & '"' Local $Folder3 = '"' & @DesktopDir & '"' Local $Folders = $Folder1 & ' ' & $Folder2 & ' ' & $Folder3 RunWait($RarExe & ' a -r ' & $Archive & ' ' & $Folders) -edit1- oops, was working with an already existing folder. added FileExists(), DirCreate() -edit2- one more amendment. string together folders for one call to Rar. thanks my sir i will try that codes when i am free in soon time Link to comment Share on other sites More sharing options...
JohnOne Posted January 9, 2011 Share Posted January 9, 2011 Here is the scripz 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...
kingooo Posted January 9, 2011 Author Share Posted January 9, 2011 Here is the scripzthank you but is not good for me because i saw easy tool that save all information in archive file and u can recover your files from that archive file Link to comment Share on other sites More sharing options...
JohnOne Posted January 9, 2011 Share Posted January 9, 2011 Thats scrip file do that save easy all infoomationz. 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...
Varian Posted January 9, 2011 Share Posted January 9, 2011 Thats scrip file do that save easy all infoomationz.Gigglez Link to comment Share on other sites More sharing options...
kingooo Posted January 10, 2011 Author Share Posted January 10, 2011 You don't need all that code. Rar will do it for you! If Not FileExists(@ScriptDir & '\BackUp') Then DirCreate(@ScriptDir & '\BackUp') Local $RarExe = @ProgramFilesDir & '\Winrar\Rar.exe' Local $Archive = '"' & @ScriptDir & '\BackUp\BackUp.rar' & '"' Local $Folder1 = '"' & @MyDocumentsDir & '"' Local $Folder2 = '"' & @FavoritesDir & '"' Local $Folder3 = '"' & @DesktopDir & '"' Local $Folders = $Folder1 & ' ' & $Folder2 & ' ' & $Folder3 RunWait($RarExe & ' a -r ' & $Archive & ' ' & $Folders) -edit1- oops, was working with an already existing folder. added FileExists(), DirCreate() -edit2- one more amendment. string together folders for one call to Rar. thank you very much actually your code are very excellent but i need one request that is how to copy files that is exist in partions that do not contain system files such as d- e-f not c partion the second request \ if pc do not contain winrar program what is the codes that include in this tool i am very sorry because i am biggner in autoit script Link to comment Share on other sites More sharing options...
ripdad Posted January 10, 2011 Share Posted January 10, 2011 kingooo, Everything you need is in the code I posted. All you have to do is change the paths. "The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward Link to comment Share on other sites More sharing options...
kingooo Posted January 11, 2011 Author Share Posted January 11, 2011 (edited) kingooo,Everything you need is in the code I posted. All you have to do is change the paths.you should be cool because of my questionsoknow i want to know what is the code that perform choice all partions in hard disk except system partion Edited January 11, 2011 by kingooo Link to comment Share on other sites More sharing options...
iamtheky Posted January 11, 2011 Share Posted January 11, 2011 Thats more like it, I was thrown off by the code in the first post, but it really is you! if only $folder1 equaled d:\ and $folder2 equaled e:\ and $folder3 equaled f:\, then you wouldnt have to write anything at all. ,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-. |(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/ (_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_) | | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) ( | | | | |)| | \ / | | | | | |)| | `--. | |) \ | | `-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_| '-' '-' (__) (__) (_) (__) Link to comment Share on other sites More sharing options...
kingooo Posted January 12, 2011 Author Share Posted January 12, 2011 Thats more like it, I was thrown off by the code in the first post, but it really is you!if only $folder1 equaled d:\ and $folder2 equaled e:\ and $folder3 equaled f:\, then you wouldnt have to write anything at all.thanksbut operating system maybe exist in d,e or ftherefor i want use code that execut next commandchoise all partions except homedrive(partion which contain operating system) Link to comment Share on other sites More sharing options...
kingooo Posted January 12, 2011 Author Share Posted January 12, 2011 thanksbut operating system maybe exist in d,e or ftherefor i want use code that execut next commandchoise all partions except homedrive(partion which contain operating system)up Link to comment Share on other sites More sharing options...
JohnOne Posted January 12, 2011 Share Posted January 12, 2011 Write some fucking code to help yourself will you, you little pain in the arse. 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...
GEOSoft Posted January 12, 2011 Share Posted January 12, 2011 @kingooo I think you are starting to push your luck a bit. We are not here to write code for you, on the contrary, our principal role is to help you find out why the code you have written is not working as expected. I suggest you write some code that you feel should work and if it fails then post it with a request for assistance. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
kingooo Posted January 12, 2011 Author Share Posted January 12, 2011 @kingoooI think you are starting to push your luck a bit. We are not here to write code for you, on the contrary, our principal role is to help you find out why the code you have written is not working as expected.I suggest you write some code that you feel should work and if it fails then post it with a request for assistance.If Not FileExists(@ScriptDir & '\BackUp') Then DirCreate(@ScriptDir & '\BackUp')Local $RarExe = @ProgramFilesDir & '\Winrar\Rar.exe'Local $Archive = '"' & @ScriptDir & '\BackUp\BackUp.rar' & '"'Local $Folder1 = '"' & @MyDocumentsDir & '"'Local $Folder2 = '"' & @FavoritesDir & '"'Local $Folder3 = '"' & @DesktopDir & '"'Local $Folders = $Folder1 & ' ' & $Folder2 & ' ' & $Folder3RunWait($RarExe & ' a -r ' & $Archive & ' ' & $Folders)now i write that codes you should help meoperating system maybe exist in d,e or ftherefor i want use code that execut next commandchoise all partions except homedrive(partion which contain operating system)what are codes Link to comment Share on other sites More sharing options...
Chimaera Posted January 12, 2011 Share Posted January 12, 2011 But that is ripdads code not any of your own making. Geez man im a noob at autoit but at least i try and write my own origanal code with the help of these knowlegable people Not just expect someone to do it all for me If Ive just helped you ... miracles do happen. Chimaera CopyRobo() * Hidden Admin Account Enabler * Software Location From Registry * Find Display Resolution * _ChangeServices() 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