Running Windows .bat file on Wine CMD.

Questions about Wine on Linux
Locked
jos34
Newbie
Newbie
Posts: 1
Joined: Thu Feb 18, 2016 12:28 pm

Running Windows .bat file on Wine CMD.

Post by jos34 »

Can anyone make this batch (.bat) file run on Wine CMD??
http://www39.zippyshare.com/v/edG8msF3/file.html

On Windows when i run it normaly it id displaying this text what is good:

Voer programmalink in (of 'h' voor hulp):

When i run it as "Administrator" is displaying this text what is NOT good:

"xidel.exe" niet gevonden.
"ffmpeg.exe" niet gevonden.

On the website from the creator (http://reino.degeelebosch.nl/uitzend...atchgemist.htm) of the batch script is saying you must change this lines with the full path if you want run it as "Administrator", but i don't understand who i can correct this path good for use in Linux, where are no drive letters.:

:Check
SET xidel="xidel.exe"
SET ffmpeg="ffmpeg.exe

:Check
SET xidel="D:\Software\Binaries\Text\xidel.exe"
SET ffmpeg="D:\Software\Binaries\Media\ffmpeg.exe"

Clip is in: \home\username\.wine\drive_c\windows\system32

Can anyone tell me how to run this script on Linux or change the sript so i can use it on Linux??
Maybe someone can recreate it too use with Wine?
Thank you!

Please note that the creator of the script is a linux noob. We canot ask him to make the script Wine compatible.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Running Windows .bat file on Wine CMD.

Post by Bob Wya »

I would suggesting reading up a little a bit...
Running Windows Batch Files on Linux
The author is quite knowledgeable and writes a tonne of Linux articles. To fill in some blanks you might have.

Plus the WineHQ FAQ. This Wiki page introduces the notion of a Windows path and a Unix path - describing how to convert between them when using Wine.

Wine maps all directories and folders relative to the "virtual" Windows drive letters. The root paths of these drive letters can be found in (for the default Wineprefix):

Code: Select all

/home/username/.wine/dosdevices/

Code: Select all

\home\username\.wine\drive_c\windows\system32
Bzzt - no such thing!! That's a Unix path - with forward slashes instead of backslashes.

Typical Z: is mapped to your Unix root / - so you can reference any file your system relative to /, e.g. the previous Wine Windows path (but corrected):

Code: Select all

Z:\\home\\username\\.wine\\drive_c\\windows\\system32
note you need to escape the forward slashes - as BASH (other shells are available) will mis-interpret them as escape sequences...

That Wine Windows path is equivalent to:

Code: Select all

C:\\windows\\system32
To convert to a Unix path:

Code: Select all

winepath "C:\\windows\\system32"
/home/username/.wine/dosdevices/c:/windows/system32
That is just equivalent to:

Code: Select all

/home/username/.wine/drive_c/windows/system32
(they are symlink'd in your Unix filesystem)

Anyway - enough theory - I took a look at the batch script. 8)

Just plonk the 2 attached binaries (xidel.exe & ffmpeg.exe) in:

Code: Select all

/home/username/.wine/drive_c/
That is equivalent to C:\ on Windows.

Then add C:\ before the executable references in your batch script:

Code: Select all

SET xidel="C:\xidel.exe"
SET ffmpeg="C:\ffmpeg.exe"
I'd be interested to know if you get it working... 8)

Bob
Locked