[Zope] extraction of complete filepath of a <input type=file> object

Casey Duncan cduncan@kaivo.com
Fri, 29 Jun 2001 15:17:58 -0600


Laurie Nason wrote:
> 
> I have the opposite problem - I would like windoze to give me only the file
> name - am I going to have to parse the complete path to strip out the \'s?
> 
> Laurie
> 

You could do a:

_.string.split(file.filename,'\')[-1]

Which should work for both file names and paths.

-- 
| Casey Duncan
| Kaivo, Inc.
| cduncan@kaivo.com
`------------------>