WinRar batch Passowortabfrage

Digger-Deluxe

Lt. Junior Grade
Registriert
Juli 2006
Beiträge
284
Moinsen,
ich möchte diesen .bat Quelltext so erweitern, dass man beim entpacken der erstellten WinRar Archive nach einem Passwort gefragt wird. :p
Aber ich bekomme es leider nicht hin, ich hoffe ihr koennt mir helfen

Gruss
Matthias


Quelltext:

@echo off
setlocal
set BackupDir=C:\
set WinrarDir=C:\Programme\Winrar
set SrcDir=C:\Dokumente und Einstellungen\All Users\Dokumente\Eigene Bilder\Beispielbilder

rem Archiv-Attribut setzen
attrib +A "%SrcDir%\*" /S /D

"%WinrarDir%\winrar.exe" a -r -Y -EP -ac -ao -vn -ow -os -ep1 -agYYYY-mm-dd-hh-mm-ss "%BackupDir%" "%SrcDir%"
endlocal
echo Fertig!
pause
 
Nun du musst auch beim erstellen des RAR Archives ein passwort vergeben, hier der Auszug aus der Hilfe

Switch -P[pwd] - set password


--------------------------------------------------------------------------------


Set a password <pwd> to encrypt files during archiving or to decrypt during extracting. The password is case-sensitive. If you omit the password in the command line, you will be prompted to enter it.

In the shell mode a password may be entered through Enter default password dialog or in the Archive name and parameters dialog.

Example
add the contents of the folder "games" to the archive " secret", using the password ZaBaToAd

WinRAR a -pZaBaToAd -r secret games\*.*

Notes
if you wish to achieve real security do not use a password shorter than 8 characters or one which is easy to guess;
do not forget your passwords or your data will be completely lost.
 
Erstmal danke :) .
Aber wo genau in meinem Quelltext muss ich den Befehl einfügen, bei mir kommen nämlich Fehlermeldungen.
 
"%WinrarDir%\winrar.exe" a -pgeheimeskennwort -r -Y -EP -ac -ao -vn -ow -os -ep1 -agYYYY-mm-dd-hh-mm-ss "%BackupDir%" "%SrcDir%"
 
Zurück
Oben