What language or application are you using? In the VBA environment, like in Access, you have several string functions that you can apply to constants and variables. These include Len(), Left(), Right(), Mid(), and InStr(). The functions Trim(), LTrim(), and RTrim() are also helpful for removing spaces from a variable. If you do not always know the number of characters, you may need to also use the Len() function.
Hope that this helps. I am only familiar with VBA and Access. David Nealey ----- Original Message ----- From: "List Server" <[EMAIL PROTECTED]> Sent: Wednesday, October 30, 2002 12:31 PM Subject: ERMAPPER-L Daily Digest > ---------------------------------------------------------------------- > > Date: Wed, 30 Oct 2002 11:47:44 -0500 > From: "Evan Picard" <[EMAIL PROTECTED]> > Subject: i only want the file name! > Reply-To: [EMAIL PROTECTED] > how can i get ONLY the file name from a variable? > example: > $var = "F:\Trends_Analysis\data\data_creation\batchtest\emp805575.jpg" > > > all i want is "emp805575" with NO EXTENSTION. > > is this possible? > > > evan > > ---------------------------------------------------------------------- > > From: "Christopher Ferro" <[EMAIL PROTECTED]> > Subject: Geodetic to Orthographic > Date: Wed, 30 Oct 2002 11:56:47 -0500 > Reply-To: [EMAIL PROTECTED] > I need to project a raster dataset from sphere/geodetic to an orthographic > projection. ER Mapper 6.3 seems to have problems making the conversion. I > get an error saying that the extents can not be determined or that there is > no ability to go from the geodetic data to an orthographic projection. Does > anyone have a way to work around this? What intermediate projection might > work? > > Christopher Ferro > NASA Classroom of the Future > Center for Educational Technologies > Wheeling Jesuit University > > ---------------------------------------------------------------------- > > From: Lance Crumbliss <[EMAIL PROTECTED]> > Subject: RE: i only want the file name! > Date: Wed, 30 Oct 2002 11:15:06 -0600 > Reply-To: [EMAIL PROTECTED] > use split. split the string at "." then split the first value in the > resulting array at "\". the file name will be the last non-null value in > that array. > > -----Original Message----- > From: Evan Picard [mailto:empicard@;gw.dec.state.ny.us] > Sent: Wednesday, October 30, 2002 10:48 AM > To: [EMAIL PROTECTED] > Subject: i only want the file name! > > > how can i get ONLY the file name from a variable? > example: > $var = "F:\Trends_Analysis\data\data_creation\batchtest\emp805575.jpg" > > > all i want is "emp805575" with NO EXTENSTION. > > is this possible? > > > evan > > ----------------------------------------------------------- > > To make changes to your subscription, please visit our website, > http://www.ermapper.com/technicl/ermapperl/index.htm > ---------------------------------------------------------------------- > > Date: Wed, 30 Oct 2002 09:57:56 -0800 > From: Eric Augenstein <[EMAIL PROTECTED]> > Subject: Re: i only want the file name! > Reply-To: [EMAIL PROTECTED] > At 11:47 AM 10/30/2002 -0500, you wrote: > >how can i get ONLY the file name from a variable? > >example: > >$var = "F:\Trends_Analysis\data\data_creation\batchtest\emp805575.jpg" > >all i want is "emp805575" with NO EXTENSTION. > > Use the "filename" command to get the name of the file itself, then > split the filename at the period and use the first part, i.e., > > $var = "F:\Trends_Analysis\data\data_creation\batchtest\emp805575.jpg" > $fname = filename $var # returns "emp805575.jpg" > $fname_sp = split $fname at "." # split name at dot > $fname_no_ext = $fname_sp[1] # set var to part 1 "emp805575" > > If you have multiple dots in the filename (i.e., file1.10m.jpg) then you'll > need to do a bit more work. > > Eric Augenstein > --------------------------------------------------------------- > Earthstar Geographics > 5330 Carroll Canyon Road > Suite 206 > San Diego, CA 92121 USA > > Email: [EMAIL PROTECTED] > Web: www.es-geo.com > Tel: +1 858-455-9970 > Fax: +1 858-455-9971 > --------------------------------------------------------------- > > > > ---------------------------------------------------------------------- > > From: Lance Crumbliss <[EMAIL PROTECTED]> > Subject: RE: i only want the file name! > Date: Wed, 30 Oct 2002 12:13:36 -0600 > Reply-To: [EMAIL PROTECTED] > that will work in 6.x and above. i'm sure most posters out there have that, > though. > > -----Original Message----- > From: Eric Augenstein [mailto:eric@;es-geo.com] > Sent: Wednesday, October 30, 2002 11:58 AM > To: [EMAIL PROTECTED] > Subject: Re: i only want the file name! > > > At 11:47 AM 10/30/2002 -0500, you wrote: > >how can i get ONLY the file name from a variable? > >example: > >$var = "F:\Trends_Analysis\data\data_creation\batchtest\emp805575.jpg" > >all i want is "emp805575" with NO EXTENSTION. > > Use the "filename" command to get the name of the file itself, then split > the filename at the period and use the first part, i.e., > > $var = "F:\Trends_Analysis\data\data_creation\batchtest\emp805575.jpg" > $fname = filename $var # returns "emp805575.jpg" > $fname_sp = split $fname at "." # split name at dot $fname_no_ext = > $fname_sp[1] # set var to part 1 "emp805575" > > If you have multiple dots in the filename (i.e., file1.10m.jpg) then you'll > need to do a bit more work. > > Eric Augenstein > --------------------------------------------------------------- > Earthstar Geographics > 5330 Carroll Canyon Road > Suite 206 > San Diego, CA 92121 USA > > Email: [EMAIL PROTECTED] > Web: www.es-geo.com > Tel: +1 858-455-9970 > Fax: +1 858-455-9971 > --------------------------------------------------------------- > > > > ----------------------------------------------------------- > > To make changes to your subscription, please visit our website, > http://www.ermapper.com/technicl/ermapperl/index.htm > ---------------------------------------------------------- > To stop receiving the daily digest, send email to [EMAIL PROTECTED] with the command > set mode standard ermapper-l > in the body. > ----------------------------------------------------------- To make changes to your subscription, please visit our website, http://www.ermapper.com/technicl/ermapperl/index.htm
