Advertisement

There's no such thing as a stupid question, but they're the easiest to answer.
Login
Search

Advertisement

Windows Vista Windows Vista
Search Search
Search for:
Tech Support Guy > > >

Creating a .bat with spaces in file name...


(!)

shhhhh's Avatar
shhhhh shhhhh is offline
Junior Member with 3 posts.
THREAD STARTER
 
Join Date: Feb 2009
Experience: Intermediate
03-Feb-2009, 05:05 AM #1
Creating a .bat with spaces in file name...
Hello all,

I'm trying set up a batch file to open an excel sheet this is the code...

start /d "C:\Users\My Name\Documents\Stock stuff\Stock Screen.xls"

However it seems it is not recognizing the file name I've tried tons of variations but it always returns with either cannot recognize Stock, or cannot recognize screen.

I am using windows vista. This is the correct path, I used shift + right mouse button just to ensure that fact.


Thank you all for your help!
Shhhhh
shhhhh's Avatar
shhhhh shhhhh is offline
Junior Member with 3 posts.
THREAD STARTER
 
Join Date: Feb 2009
Experience: Intermediate
03-Feb-2009, 05:38 PM #2
bump... I'm really at a loss here if anyone has any thoughts I'd truly appreciate it!

Thank you all,
Shhhhh
TerryNet's Avatar
Computer Specs
Moderator with 65,779 posts.
 
Join Date: Mar 2005
Location: Ottawa, IL
03-Feb-2009, 07:58 PM #3
The /d parameter calls for a path name, not a file name. What is the entire command line you are using?

I don't know your purpose here, but to open a spreadsheet in the default application all you need in your batch file is

"C:\Users\My Name\Documents\Stock stuff\Stock Screen.xls"
Gulo Luseus's Avatar
Gulo Luseus   (Alex) Gulo Luseus is offline
Computer Specs
Member with 2,219 posts.
 
Join Date: May 2007
Location: England
Experience: Advanced
04-Feb-2009, 12:22 PM #4
Not solving the direct problem, but would a shortcut not do the job? as you are in Vista would be a lot easier, unless you are reverting to a different environment?
koen7's Avatar
koen7 koen7 is offline
Member with 78 posts.
 
Join Date: Nov 2008
05-Feb-2009, 01:20 AM #5
start "" "c:\users\..."
shhhhh's Avatar
shhhhh shhhhh is offline
Junior Member with 3 posts.
THREAD STARTER
 
Join Date: Feb 2009
Experience: Intermediate
05-Feb-2009, 01:39 AM #6
Thank you all so much for all your assistance. A combination of all your answers did the trick.

I removed the /d parameter. and originally dropped the start command as well, but that was not working, finally Koen's suggestion

start "" "c:\users...

That did the trick!

For those who were wondering what my intentions are.... I work from home and everyday when I start computer I have to open 8 separate excel files, plus numerous other files. trying to create on batch to do it all!

Again thank you all!
Shhhhh
As Seen On

BBC, Reader's Digest, PC Magazine, Today Show, Money Magazine
WELCOME TO TECH SUPPORT GUY!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.


(clock)
THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.

Search Tech Support Guy

Find the solution to your
computer problem!




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


WELCOME
You Are Using: Server ID
Trusted Website Back to the Top ↑