Skip to main content
Inspiring
November 19, 2010
Question

removing extension on a file

  • November 19, 2010
  • 1 reply
  • 492 views

I've got a page that uploads a zip file. The name of the file is being captured via cffile.clientfile, and of course includes the ".zip" extension in its name. Since I'm unzipping the file and accessing the newly created folder, (same name as the zip file), I need the captured name to be deleted of it's .zip extension within the cffile.clientfile variable. Possible? I'm guessing I have to get the full name with cffile.clientfile and then use some regex or something? Any sample code?

    This topic has been closed for replies.

    1 reply

    Squiggy2Author
    Inspiring
    November 19, 2010

    Ah, it looks like I can use File.ClientFileName...

    BKBK
    Community Expert
    Community Expert
    November 21, 2010

    For recent versions of Coldfusion, it is cffile.clientFileName