Some Batch-Scripting-Problems under Windows

Daniel Spannbauer
Thu May 3 12:23:00 GMT 2007


we've build a Program for Cygwin to load some Firmware in some Hardware
which is produced by us.
The Firmwware is called file.tld. At the moment the USer has to open
Cygwin, jumpd to the Path of the file.tld (for example: C:\Dokumente und
Einstellungen\test\Eigene Dateien\tload) an run the program by "tload -l
/dev/ttyS0 file.tld".

This is very uncomfortable.
Now I try to write a simple Batch-Script to do this automaticly, so you
have just to douible-klick  on file.tld an the  Firmware is loaded over
a predefined serial Line.

The batch-Script looks as follows:

c:\Programme\cygwin\bin\bash -c "/bin/tload.exe -l %LINE% %1%"

But this won't work couse "%1%" is still "C:\Dokumente und
Einstellungen\test\Eigene Dateien\tload\file.tld" which isn't a cygwin-Path.
So I cahnged the script as follows:

c:\Programme\cygwin\bin\bash -c "/bin/tload.exe -l %LINE% '/bin/cygpath
-a -i %1%' "
But this also don't work. couse "%1% has Double-Quots (") at first and
last place.

I think it is just a quoting-Problem.

Any Ideas out there?



Daniel Spannbauer                         Systembetreuung
marco Systemanalyse und Entwicklung GmbH  Tel   +49 8333 9233-27 Fax -11
Auf der Wies 8, D 87727 Babenhausen       Mobil +49 171 4033220                      Email
Geschäftsführer Martin Reuter             HRB 68255 Amtsgericht München

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list