Use regular expressions to get only the file name from the path. You should use something like this:
$path =~ s/^.*[\\\/]//; Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] ----- Original Message ----- From: "james lundeen" <[EMAIL PROTECTED]> To: "beginners-cgi" <[EMAIL PROTECTED]> Sent: Sunday, December 22, 2002 12:56 AM Subject: File upload - probably simple.. hey, do you have a solution to this? I need to upload a file, but i just want the file name, not the entire path. Currently, it saves the actual file on the server as: G:\ISIR\ISIR2002gallery\images\isir1.jpg as the FILENAME!!! i just want it to save as "isir1.jpg" or whatever the filename is for the file that the user is uploading... windows machine path for the file: G:\ISIR\ISIR2002gallery\images\isir1.jpg should end up as the following on the linux server: /home/website1/html/images/isir1.jpg Anyone with info on this, I'd really appreciate feedback. Thanks!!! __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]