Skip to contentSkip to conversation

Linux filename to DOS filename?

DISCUSSION Petr Tomasek 3 participants 4 messages May 23, 2004

lore
Share & tools
lore
#0 lore raw

Hello!

I'm trying to bind some old DOS program with my desktop (GNOME) file-type--program association, so I need to pass the filename to the program. This can be done throught the environment and the 'unix -s' dosemu command, but the problem is I need to transform the linux path somehow into the DOS.

Is this possible somehow?

Petr Tomasek

Signature · 1 line
Petr Tomasek, http://www.etf.cuni.cz/~tomasek/
#1 lore raw

Hi Petr

Am Sonntag, 23. Mai 2004 16:45 schrieb Petr Tomasek:

Quoted 6 lines

I'm trying to bind some old DOS program with my desktop (GNOME) file-type--program association, so I need to pass the filename to the program. This can be done throught the environment and the 'unix -s' dosemu command, but the problem is I need to transform the linux path somehow into the DOS.

Make a batch file in DOS, say programm.bat with

-----------------------------------

cd programm_directory
call programm
exitemu

-----------------------------------

Then call DOSemu from GNOME with

xdosemu programm.bat

That's it.

(You really should read the documentation!)

cu

Claudia

#2 lore raw
Quoted 10 lines

Make a batch file in DOS, say programm.bat with

-----------------------------------

cd programm_directory
call programm
exitemu

-----------------------------------

No, that's not the problem. That's the easy part.
What I need is a (linux) script which has a _linux_file_ as a parametr that calls a DOS program with
a _dos_file (that corresponds to that _linux_file) as a parameter.

In other words, the problem is (*how to translate from linux path to dos path according to the dosemu.conf / lredir redirs*).

I'm assuming, that we access from the dosemu only files through the linux filesystem and not directly from device.

I have read the documentation but found nothnig, that could help me.

But thanks anyway!

Petr

Signature · 1 line
Petr Tomasek, http://www.etf.cuni.cz/~tomasek/
#3 lore raw
Quoted 16 lines · Petr Tomasek
Quoted 10 lines

Make a batch file in DOS, say programm.bat with

-----------------------------------

cd programm_directory
call programm
exitemu

-----------------------------------

No, that's not the problem. That's the easy part.
What I need is a (linux) script which has a _linux_file_ as a parametr that calls a DOS program with
a _dos_file (that corresponds to that _linux_file) as a parameter.

Quoted 7 lines

In other words, the problem is (*how to translate from linux path to dos path according to the dosemu.conf / lredir redirs*).

I'm assuming, that we access from the dosemu only files through the linux filesystem and not directly from device.

I have read the documentation but found nothnig, that could help me.

according to the ChangeLog:

- Now, you can run your favourite DOS apps like this:
xdosemu "/home/clarence/games/commander keen/keen1.exe" And it will automatically:
1. mount / if the specified program is not available from an already-redirected drive
2. "cd" to the correct directory
3. and execute the program automagically, all without _any_ typing in DOS
(if "unix -e" or "unix -c" is put at the end of your autoexec.bat)

man dosemu.bin:

[-E] dos-command
Run DOS command when starting DOSEMU, and, if '-E' is not given, exit DOSEMU after running the command. The command
can also be given with a Linux path (for example
/home/joeuser/dosemu/freedos/bin/xcopy.exe). Note: this
only works if your autoexec.bat contains a "unix -e" com­ mand.

But you'd like even more I see...

One way is to have a drive, say z: corresponding to the root of the drive as
lredir z: linux\fs/
then the script could put a z: in front of the Linux name and flip slashes if the DOS app doesn't like forward slashes.

Bart

-
To unsubscribe from this list: send the line "unsubscribe linux-msdos" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html