Author Options:

how to open two word files in command prompt Answered

How do i open two word files using notepad-batch files.if i write it without something between the two words but it doesn't work. what do i write between the words


Got your answer for you, my friend. You MUST add a TITLE to your command, such as: start "TITLE" "C\Program Files". This will open your Program Files with the title of "TITLE". You MUST add this or it WILL NOT open the window through explorer. Glad I could help, :-).

start excel.exe
start"FILE 1"
start"FILE 2"
start "FILE 3"
start "FILE 4"
start "FILE 5"
start "FILE 5"
start "FILE 5"
start "FILE 6"

Or you could just type:

start pathname\filename1
start pathname\filename2

start pathname\filename & start pathname\filename

Either way...

YES! Man, It works (((((((: I did not use start and i could start song with 3 spaces (((((: THANK YOU MATE! This is what I really needed (: now I can open files with spaces (: Thanx!

It doesn't work even just writing "start c:\my documents" won't work cause its got spaces. it just says the system cannot find c:\my

. If the path contains space, you must put the path in quotes. Eg, "c:\Program Files\some file.ext" See the Example in prev msg

but does that do it if u put start in front of it cause it only opened another cmd prompt

. I'm not familiar with START. Try it without START. Just the program path and the docs. If that doesn't work, I'll see what I can find out about START.

. This works for me: "C:\Program Files\Microsoft Office\Office10\winword.exe" "C:\Documents and Settings\\My Documents\wordtest1.txt" "C:\Documents and Settings\\My Documents\wordtest2.txt" . That all goes on one line with a space between the three elements. You will have to change: the path to winword.exe, to whatever logon you are using and, of course, the file names.

. Damn Linux users! heehee I don't remember there being a printable escape code for DOS/Win, but maybe there is. Quotes will definitely work.

. You may be able to do it by issuing separate commands for each document.
  word.exe doc1.doc  word.exe doc2.doc
. But this may invoke two instances of Word. Try it and see.
. If no one comes up with an answer, try looking on the Word site.