Jump to content

Ziplemek Ve Şifrelemek ?


pilgetir
 Share

Recommended Posts

Merhaba bir sorum var autoıt ile klasörlerim içerisindeki dosyaları ve klasörler içerisindeki dosyalarıda ziplemek ve istediğim şifreyi koydurtmak istiyorum nasıl yapabilirim bir bilgim yok sadece tek tek dosyaları ziplemek istiyorum swf png mp4 gibi dosyalarım vs var ?
Link to comment
Share on other sites

@pilgetir

Sıkıştırma ve şifreleme konusunda 7z.exe, rar.exe vs. den prametre kullanarak yararlanabilirsin...
7z içni basit bir örnek vermek istiyorum... Öncelikle 7zip klasöründeki, 7z.exe dosyasını au3 scripth dosyasının yanına kopyalayın.
Isterseniz ilgili dosyayı fileinstall ile autoit içine de alabilirsiniz. Çalıştıracağınız zaman temp klasörüne çıkartıp işlem yaptırmanız kafi.

Bir dosya sıkıştırmak için;
[codebox]Global $7z_exe = @ScriptDir & '\7z.exe'
If FileExists($7z_exe) = 0 Then
MsgBox(16,"Hata",$7z_exe & " bulunamadı!")
Exit
EndIf

Global $Pass = "123"

Global $7zFile,$Instr
Global $File = FileOpenDialog("Sıkıştırılacak dsoyanı seç!", @ScriptDir & "\", "Tüm Dosyalar (*.*)")
If Not @error Then
$7zFile = $File
$Instr = StringInStr($7zFile,".",0,-1)
If $Instr > 0 And StringInStr(StringTrimLeft($7zFile,$Instr),"\") = 0 Then $7zFile = StringLeft($7zFile,$Instr-1)
$7zFile &= ".7z"

RunWait($7z_exe & ' a -p' & $Pass & ' "' & $7zFile & '" "' & $File & '"',"",@SW_HIDE)
EndIf[/codebox]

Bir klasörü sıkıştırmak için;
[codebox]Global $7z_exe = @ScriptDir & '\7z.exe'
If FileExists($7z_exe) = 0 Then
MsgBox(16,"Hata",$7z_exe & " bulunamadı!")
Exit
EndIf

Global $Pass = "123"

Global $7zFile,$Instr
Global $File = FileSelectFolder("Sıkıştırılacak klasörünü seç!", "", 5,@ScriptDir)
If Not @error Then
$7zFile = $File
$Instr = StringInStr($7zFile,".",0,-1)
If $Instr > 0 And StringInStr(StringTrimLeft($7zFile,$Instr),"\") = 0 Then $7zFile = StringLeft($7zFile,$Instr-1)
$7zFile &= ".7z"

RunWait($7z_exe & ' a -p' & $Pass & ' "' & $7zFile & '" "' & $File & '"',"",@SW_HIDE)
EndIf[/codebox]

Aynı şekilde ilgli programları ams projelerinizde de benzer şekilde parametre ile çalıştırarak kullanabilirsiniz. Kolay gelsin...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...