• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 131
  • Last Modified:

Quick answer needed for Notepad

I need a command line entry for notepad.  ex load program and then file from 2 different locals on disk.  c:\windows\notepad.exe and the text file is c:\newschools.txt.  The program has to be loaded so I can't just type the c:\newschools.txt, I have to have the c:\windows\notepad.exe and then the file to open with it.  I hope this is clear.

1 Solution
Lee W, MVPTechnology and Business Process AdvisorCommented:
Have you tried:

notepad c:\newschools.txt

or, failing that:

c:\windows\notepad c:\newschools.txt

(Windows should be in your path environment variable so you should be able to run notepad from anywhere by just typing notepad.  If not, putting the path to the notepad.exe file and the path to the file you want to open should also work).
I forgot my Dos commands.
I do not know the commands to automatically open the file. Some one can fill it in.

What I did, is to go to MSDOS.
Made a  bat file by typing Edit school.bat
The edit screen appears in blue
Type  cd..
Type c:\windows\notepad.exe on the next line
Type  exit
Save as school with the default .bat
Whent to Windows Explorer
Clicked on School.bat
Chose 'make short cut
Moved the short cut to the screen
Next Clicked on the ICON
Went to Properties
Clicked on Icons
Chose a new Icon instead of the default MSDOS icon.

go to a command prompt
go to c:
type edit autoexec.bat
where it says path = .................
add another path your c:\windows (or whatever folder windows are installed)
then u could type notepad <filename> wherever you want

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now