Mathieu,

You can loop through the string looking for the \ character. The text
after the last one will be the filename.  

Another method (which I prefer) is to use your DBMS.  Create a function
that separates the filename from the path.  Then, anywhere in your
applications you can simply call the function in a Set Fields SQL
command.  Without a function you would need to recreate the workflow
where ever you needed to parse the filename.

Stephen


-----Original Message-----
From: Action Request System discussion list(ARSList)
[mailto:[EMAIL PROTECTED] On Behalf Of Mathieu Pitre
Sent: Wednesday, July 26, 2006 10:42 AM
To: [email protected]
Subject: HOW-TO Change a string?

Hi all,

I would like to know how to modify the following string whitin a Set
field
Action:

\\path\path\path\path\FileName.ext

I would like to separate the file name out of the file path. The path
can always change and the file name too. I am trying to find the
location
(integer) of the last "\" by using the STRSTRC function but it returns
"0" 
since the path always starts with a "\".

Any suggestion?

Mathieu Pitre
ARS 6.3

________________________________________________________________________
_______
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at http://www.wwrug.org

Reply via email to