using notepad to edit a batch file

  • Thread starter Sul@MS_NewsServer
  • 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
 
S

Sul@MS_NewsServer

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.
 
V

VanguardLH

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).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top