Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Technology Project and PMC » A Tool Variable with no extension
A Tool Variable with no extension [message #41374] Thu, 09 January 2003 18:15 Go to next message
Eclipse UserFriend
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 22:37 Go to previous message
Jonathan Gossage is currently offline Jonathan GossageFriend
Messages: 42
Registered: July 2009
Member
"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 22:37 Go to previous message
Jonathan Gossage is currently offline Jonathan GossageFriend
Messages: 42
Registered: July 2009
Member
"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
Previous Topic:A Tool Variable with no extension
Next Topic:Testing swt applications.
Goto Forum:
  


Current Time: Fri Apr 26 07:25:03 GMT 2024

Powered by FUDForum. Page generated in 1.26976 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top