Sign in to follow this  
Followers 0
kingooo

i need you to give me some scripts

24 posts in this topic

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")

Share this post


Link to post
Share on other sites



you can use next codes to reach us good result

How about if you use that code to reach your own good result. :x

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.

:P


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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 by ripdad

Make yourself sheep and the wolves will eat you - Benjamin Franklin

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Your post is empty Edited 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 ...
 

Share this post


Link to post
Share on other sites

What was the question? :x

i want make tool that save all files in my document, desktop ,other partions in folder such as

http://www.mediafire.com/?39a4vbjrannds6b

and 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 file

http://www.mediafire.com/?39a4vbjrannds6b

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Here is the scripz

thank 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

Share this post


Link to post
Share on other sites

Thats scrip file do that save easy all infoomationz.

Gigglez

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

kingooo,

Everything you need is in the code I posted. All you have to do is change the paths.


Make yourself sheep and the wolves will eat you - Benjamin Franklin

Share this post


Link to post
Share on other sites

#13 ·  Posted (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 questions

ok

now i want to know what is the code that perform choice all partions in hard disk except system partion

Edited by kingooo

Share this post


Link to post
Share on other sites

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.


,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Share this post


Link to post
Share on other sites

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.

thanks

but operating system maybe exist in d,e or f

therefor i want use code that execut next command

choise all partions except homedrive(partion which contain operating system)

Share this post


Link to post
Share on other sites

thanks

but operating system maybe exist in d,e or f

therefor i want use code that execut next command

choise all partions except homedrive(partion which contain operating system)

up

Share this post


Link to post
Share on other sites

@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!"

Share this post


Link to post
Share on other sites

@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.

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)

now i write that codes

you should help me

operating system maybe exist in d,e or f

therefor i want use code that execut next command

choise all partions except homedrive(partion which contain operating system)what are codes

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0