Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

removing extension on a file

Explorer ,
Nov 19, 2010 Nov 19, 2010

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?

449
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 19, 2010 Nov 19, 2010

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 21, 2010 Nov 21, 2010
LATEST

For recent versions of Coldfusion, it is cffile.clientFileName

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources