using notepad to edit a batch file

  • Thread starter Thread starter Sul@MS_NewsServer
  • Start date Start date
S

Sul@MS_NewsServer

I use notepad to create a batch file and save it as test.bat
when I right click on the test.bat, I get a blank page
what's the fix? tia
 
The name of the file is extractchromium.bat
and contains the following
PATH=%PATH%;"C:\Program Files\7-Zip"
CD /D "%userprofile%\desktop"
FOR %X IN (*.zip) DO 7z.exe x -aoa -o"%userprofile%\desktop\" "%X"

C:\Documents and Settings\username\desktop>extractchromium
'¦P' is not recognized as an internal or external command,
operable program or batch file.



JS said:
Try running it from a command prompt.
 
Sul@MS_NewsServer said:
FOR %X IN (*.zip) DO 7z.exe x -aoa -o"%userprofile%\desktop\" "%X"

Double up on the percentage signs. One is okay when running from the
command prompt to use a variable but you need 2 inside the batch file.
You want to use a variable, not the value of the variable (defined in
whatever shell loaded that .bat file).
 
Back
Top