cheers, will try it and find out and report back
hmm, i dunno how to work this, can someone show me how :s
Assuming that you have Winrar installed in C:\Program Files\winrar
and that rar.exe exists in that folder :
@echo off
"c:\program files\winrar\rar" e -p temprar.rar
The e is the command that tells rar.exe to extract to the current directory.
The -p is the switch that tells rar.exe to ask for a password
temprar.rar is the filename to unpack.
A little bit different:
@echo off
"c:\program files\winrar\rar" e -ppassword temprar.rar d:\temp\testdir
This way, it won't ask you for a password. It uses the text immediately following the -p as the password.
This way, it does not extract to the current directory. It extracts to
d:\temp\testdir. This assumes that d:\temp\testdir already exists.
If it does not, it will not create it, nor will it extract the files.
To get all the command line options, switches, and basic syntax, you can get
rar.exe to display it.
Open a command prompt window.
Navigate to the directory that contains rar.exe, which we are assuming is
c:\program files\winrar with:
c: and hit enter.
then:
cd\"program files\winrar" and hit enter.
Type dir *.exe and hit enter.
If you see rar.exe listed, you are in the right directory.
If so, now type rar /? and hit enter
If it runs off the page, then use rar /? |more and hit enter.
This is exactly where I got the commands and switches that I've mentioned above.
I hope this helps.