Using bat file to open another fil

April 14, 2009 at 12:24:16
Specs: Windows XP

I'm working on developing a menu for a USB flash drive.

I have .bat file that opens a spreadsheet with a program that is installed on the flash drive.
The code looks something like this:

Start /d \Folder1\folder2\folderofprogram Name of program.exe "Name of file.ods"

This code works well but the problem is I need to have the file in the same directory as the program.
Is there a way to make the .bat file open the file from a different directory on the USB flash drive?

I think this is a simple problem but was not able to find any information about it.

Thanks for any help!

See More: Using bat file to open another fil

Report •

April 14, 2009 at 22:23:15
Maybe I'm missing the obvious. Can you change:

"Name of file.ods"


"x:\foldname\Name of file.ods"

If at first you don't succeed, you're about average.


Report •

April 15, 2009 at 00:10:17
i'm a newbie to this...
if the file is in the same drive as the program, what if i use

%drive%"Name of file.ods" ?

Report •

Related Solutions

Ask Question