none
how to allow the special character in folder or file name of document library

    Question

  •  

    when i add the special character "&" in folder or file name it gives following error

     

    "The file or folder name "P&A" contains invalid characters. Please use a different name. Invalid characters include the following: ~ " # % & * : < > ? / \ { | }. The name cannot begin or end with dot and cannot contains consecutive dots."

     

    how can i allow these character in folder or file name.

    waiting

    Saturday, December 01, 2007 11:44 AM

All replies

  • Unfortunately there's no way to change this - the restricition is hard coded within the API and there's no way that I know of to get around it.

    Saturday, December 01, 2007 4:30 PM
  • Please in future post a question ONLY TO ONE forum.

     

    There is no need to post the same question to both this forum and another one (it was either general or setup/adminstratrion).

     

    All that happens is tha two people spend their time giving you the same answer. One of them was wasting his time.

    Mike Walsh

    Sunday, December 02, 2007 7:45 AM
  • There is no way to upload file name with above special character. But you can do following alternative:

    1. You can have utility that can clean file name and upload into specific library.

    2. Develop web part that provide facility to clean file name contain special character and upload into specific library.

     

    Wednesday, November 02, 2011 12:50 PM
  • Hi,

    Restrictions are placed upon file and folder names in the following ways :

    1.The name can not begin or end with a period

    2. The name can not contain a double period

    3. The file name can not exceed 128 characters in length

    4. The folder name can not exceed 128 characters in length

    5.Below mentioned special characters are not allowed,However as a work around you may write an "onitemadding" event handler so that when you upload an item you can check the filename for any special characters via the SP object model and replace it with an underscore(preferably) or a space to make file uploading possible.

    "
    -
    Quotation mark
    #
    -
    Number sign
    %
    -
    Percent Sign
    &
    -
    Ampersand
    *
    -
    Asterisk
    :
    -
    Colon
    <
    -
    Less than Symbol
    >
    -
    Greater than Symbol
    ?
    -
    Question Mark
    \
    -
    Backslash
    {
    -
    Left Brace
    }
    -
    Right Brace
    |
    -
    Pipe
    ~
    -
    Tilde
    /
    -
    Slash

    Regards,

    Grigory

    Tuesday, November 08, 2011 6:45 PM