| 1. |
Solve : writting a .bat file? |
|
Answer» is there anyway to make a .BAT folder that will open up a rar file for me and enter the password for me and i can store it on a USB drive for security reasons? cheers, will try it and find out and report back Assuming that you have Winrar installed in C:\Program Files\winrar and that rar.exe exists in that folder : Code: [Select]@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: Code: [Select]@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. |
|