A Tool Variable with no extension [message #41374] |
Thu, 09 January 2003 13:15  |
Eclipse User |
|
|
|
Originally posted by: bbagnall.escape.ca
Hi,
I'm setting up custom tools in Eclipse and trying to pick out the name of a
file, without using the extension. For example if the filename is 'hello.c',
I'd like the tool arguments to pick out the name 'hello' and drop the file
extension.
I went through all the project variables supplied by Eclipse and none of
them gives this option. Do I need to create a makefile in order to have this
kind of functionality? I'm using Windows, so if there is a way to do this in
a batch file that would also be helpful.
Note: The reason for this is I need to run the compiled binary file using an
emulator. This file has no extension, and uses the same name as the main
source file.
Brian Bagnall
---------------------------------------------
My homepage http://www.mts.net/~bbagnall
|
|
|
Re: A Tool Variable with no extension [message #41406 is a reply to message #41374] |
Thu, 09 January 2003 17:37  |
Eclipse User |
|
|
|
"Brian Bagnall" <bbagnall@escape.ca> wrote in message
news:avkdcq$lu3$1@rogue.oti.com...
> Hi,
>
> I'm setting up custom tools in Eclipse and trying to pick out the name of
a
> file, without using the extension. For example if the filename is
'hello.c',
> I'd like the tool arguments to pick out the name 'hello' and drop the file
> extension.
>
> I went through all the project variables supplied by Eclipse and none of
> them gives this option. Do I need to create a makefile in order to have
this
> kind of functionality? I'm using Windows, so if there is a way to do this
in
> a batch file that would also be helpful.
>
> Note: The reason for this is I need to run the compiled binary file using
an
> emulator. This file has no extension, and uses the same name as the main
> source file.
>
> Brian Bagnall
>
You can do this using Windows batch files. The syntax is %~nx where x is the
index of the argument containing the full file name. See the topic "Using
batch parameters" in "Support and help" for more details.
Regards
Jonathan Gossage
|
|
|
Re: A Tool Variable with no extension [message #588556 is a reply to message #41374] |
Thu, 09 January 2003 17:37  |
Eclipse User |
|
|
|
"Brian Bagnall" <bbagnall@escape.ca> wrote in message
news:avkdcq$lu3$1@rogue.oti.com...
> Hi,
>
> I'm setting up custom tools in Eclipse and trying to pick out the name of
a
> file, without using the extension. For example if the filename is
'hello.c',
> I'd like the tool arguments to pick out the name 'hello' and drop the file
> extension.
>
> I went through all the project variables supplied by Eclipse and none of
> them gives this option. Do I need to create a makefile in order to have
this
> kind of functionality? I'm using Windows, so if there is a way to do this
in
> a batch file that would also be helpful.
>
> Note: The reason for this is I need to run the compiled binary file using
an
> emulator. This file has no extension, and uses the same name as the main
> source file.
>
> Brian Bagnall
>
You can do this using Windows batch files. The syntax is %~nx where x is the
index of the argument containing the full file name. See the topic "Using
batch parameters" in "Support and help" for more details.
Regards
Jonathan Gossage
|
|
|
Powered by
FUDForum. Page generated in 0.04801 seconds