[Last Call] Learn how to a build a cloud-first strategyRegister Now


Batch file to start Excel, path has spaces

Posted on 2011-05-03
Medium Priority
Last Modified: 2012-05-11
I have a cmd file to start excel using a certain file as a template.
Excel starts, but the file can't be found because the template location has spaces in its filepath, even if i put it in quotes

Start "" excel.exe /t"\\SERVER01\My Firm\General\TEMPLATES\Bank_Account_Monthly_Sheet.xlt"

Any ideas of how to get this to work, the 'My Firm' location has all company data on it so can't be changed.
Question by:GegH
  • 3
  • 2
LVL 59

Accepted Solution

Bill Prew earned 1200 total points
ID: 35518124
Do you have a space after the /t?

Start "" excel.exe /t "\\SERVER01\My Firm\General\TEMPLATES\Bank_Account_Monthly_Sheet.xlt"


Author Comment

ID: 35524177
No space after the /t. only a space between 'my' and 'firm'.

When the error comes up on opening it says it can't find:

LVL 23

Assisted Solution

by:Brian Gee
Brian Gee earned 800 total points
ID: 35542455
I think billprew was trying to suggest inputting a space after the /t so it reads how he typed it in his post. See if copying and pasting what he typed works for you.
NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!


Author Comment

ID: 35557903
That's great, thankyou.

On a related note, i did a similar thing for word, it was working, creating a new file from a template now it seems to give me an option to open as read only.

Any ideas as to why it would be different.
Start "" Winword.exe /t "\\SERVER01\My Firm\General\TEMPLATES\Memo.dot"
LVL 23

Assisted Solution

by:Brian Gee
Brian Gee earned 800 total points
ID: 35566738
Open the file NOT as read-only. Go to Tools, Options, Security tab, uncheck Read-only recommended checkbox, OK, Save and then close the document. Try reopening it. You should not get this prompt again for this file.

Author Closing Comment

ID: 35714090
All these solutions are correct, but i guess billprew was the original answer and so should get the lions share of the credit.
Thankyou so much for the input.

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ever wonder what it's like to get hit by ransomware? "Tom" gives you all the dirty details first-hand – and conveys the hard lessons his company learned in the aftermath.
With its various features, Office 365 can not only help you with your day-to-day business tasks, it can also do wonders for your marketing campaign.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question