Trim Filename

Results 1 to 3 of 3

Thread: Trim Filename

  1. #1
    Join Date
    Dec 1969

    Default Trim Filename

    Hi all,<BR><BR>I want to trim a filename that i&#039;m uploading. So, for example, if I upload filename.txt, I want to trim this to just filename (remove the last 4 characters).<BR><BR>How do I do this?

  2. #2
    Join Date
    Dec 1969

    Default RE: Trim Filename

    there&#039;s a function in the codelibrary at for this<BR><BR>j

  3. #3
    Join Date
    Dec 1969

    Default Split()

    As with an earlier question, take a look at the Split() method of the String object and look for the "."<BR><BR>mySplit = myFileName.split(".")<BR>document.write("FileName = " + mySplit[0]);<BR>document.write("Extension =" + mySplit[1]);<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts