Handling illegal characters in file and folder names

Due to the cross-platform nature of our DAM, some characters which are valid on OSX are not valid on our DAM, like :*?\"<>|;#. So I want to prevent that users using our Drive connector create files or folders containing these characters.
Is it possible to present the user an appropriate error message in this case? In other words, what Exception should be thrown? I've tried a general RemoteHandlerException, this results in a login dialog in OSX Finder, not just an error that the file/folder cannot be created.

Cross posted
http://forum.java.sun.com/thread.jspa?threadID=768693&tstart=0

Similar Messages

  • Prevent using special characters in file and folder names?

    I've recently begun adding windows clients to my network. In doing so, I've found that on my file shares from OS X server, the windows clients are unable to see files and folders which have names containing special characters such as / ? < > \ : * | ”
    Unfortunately my accounting department has been creating files with these characters in their names for several years. I would like to find if there is a way to prevent them from using a defined set of characters in the file and folder names to prevent them from "accidentally" doing so in the future.
    I've found that by turning off streams support on SMB in OS X server, that my windows clients can at least see that a file or folder should exist, albeit with a corrupted file name. Removing the special characters from these names allows the proper name to become visible and the file accessible.
    Any info would be greatly appreciated.

    (_seb_) wrote:
    > Gary White wrote:
    >> On Sun, 19 Nov 2006 19:15:04 +0100, "(_seb_)"
    <[email protected]> wrote:
    >>
    >>> "ça alors: it's a déjà-vu"
    >>>
    >>> How can I encode this so it's valid as a
    directory name, yet can be
    >>> displayed as intended when the name is output to
    the page.
    >>> urlencode() does not do the job, neither does
    htmlentities()...
    >>
    >>
    >> What's wrong with:
    >>
    >> $l="ça alors: it's a déjà-vu";
    >> print urlencode($l)."<br>\n";
    >> print htmlspecialchars($l);
    >>
    >> Gary
    >
    >
    > I know that, but what is the name of the directory? It
    has to be a real
    > directory name, not a string stored somewhere.
    >
    > What's a valid encoding for a directory named "ça
    alors: it's a
    > déjà-vu"? I can call a folder like this on my
    Mac, but it won't work on
    > any server...
    >
    >
    >
    PS: basically it's not a url encoding issue.
    I can url encode "ça alors: it's a déjà-vu",
    and pass it in a url query string. But my issue is not
    with an url query string, it's with an actual URL, that is,
    the actual name of the directory. It
    can't be "ça alors: it's a déjà-vu". But I
    want to allow the user to name their directory like that
    if they want. So I need a way to encode this into characters
    that can be used for an actual
    directory on the server.
    seb ( [email protected])
    http://webtrans1.com | high-end web
    design
    Downloads: Slide Show, Directory Browser, Mailing List

  • Bring back colored file and folder names

    The dots have got to go!!!  Make them an option if you need to, but GIVE US BACK THE HIGHLIGHTING OF FILE NAMES, FOLDER NAMES, AND FOLDERS!!!!!!!!
    WHEN ARE YOU GOING TO LISTEN TO YOUR CUSTOMERS --- THIS IS NOT A GOOD IDEA

    These are user-to-user forums where everyday folk (volunteers) post questions and offer answers (technical support) to each other.
    Apple involvement. Apple may respond to questions but does not formally provide technical support on the Site. Any information that is provided by Apple or Apple employees is offered on an "AS IS" basis without warranties of any kind.
    Post your concerns in the Product Feedback forum. 
    Posting in CAPS LOCK Is often seen as screaming and is not appreciated.  It's also very hard to read. 

  • Why are my file and folder names changing randomly? (Appending Dates)

    Recently Finder has taken to randomly (it seems) appending the date to various folder and file names. For example today I dragged a file from Destop into Documents folder and the file name changed immediately after the move:
    From: wedding-invite.pdf
    To: wedding-invite 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013 12/11/2013.pdf
    This has happed to folder names as well with different amounts of replication and different dates (usually today's date or document creation date). It happens to some files and folders but not to others. Those that it does happen to have no UNDO trail for the particular action (like Undo Move for example).
    Very frustrating - any assistance would be appreciated.
    I am running nothiong special (I do run Google Drive on my iMac). Also Time Machine.

    Thanks! I found this on the folder actions setup:

  • The specified file or folder name is too long,the url path for all files and folders

    The specified file or folder name is too long,the url path for all files and folders must be 260 character or less
    can we increase this limit?
    MCTS,ITIL

    Hi,
    As I understand, you want to increase the length of URL path in SharePoint 2010.
    Per my knowledge, this limit cannot be increased. SharePoint limits URL length because all relative URL links are stored in the clear forms on the SharePoint content DB and often this links are used as primary keys to link one table with another. Fields
    which are used to store these links (for instance tp_DirName from the AllUserData table) allow storing only 256 characters.
    There are several ways that you can resolve or mitigate URL length problems in the SharePoint Server 2010 environment. The following list provides suggestions:
    1. Upgrade all the end-user browsers to Internet Explorer 8, which has a longer URL length limit.
    2. Use shorter names for sites, folders, and documents and control the depth of the site and folder structures to reduce the lengths of URLs.
    3. If possible or allowed, use ASCII names for sites, folders, and documents. This will avoid situations where the URL will be lengthened by being encoded.
    4. To reduce the risk that the SharePoint Server 2010 end-users will encounter problems because of URL length limitations, we recommend that you apply the following effective limits in the deployment:
    256 Unicode (UTF-16) Code units - the effective file path length limitation, including a domain/server name
    128 Unicode (UTF-16) Code units - the path component length limitation
    More reference:
    http://technet.microsoft.com/en-us/library/ff919564(v=office.14).aspx
    http://sharepointknowledgebase.blogspot.in/2013/04/url-path-length-restrictions-in.html#.VKJN53BJA
    Best regards,
    Sara Fan

  • File and directory names with Danish characters

    I have installed the Novell Client v2.0 for Linux on my Open Suse 10.3. The Client is connecting to my Netware servers (6.0 & 6.5) without any problems...
    There is one problem... Filenames and directory names with the Danish , & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as b. and when clicking the file the file disappears from the file list. It seems to be the same problem with the German (umlaub).
    What to do?
    /Michael

    Originally Posted by J.H.M. Dassen (Ray)
    mimo <[email protected]> wrote:
    > There is one problem... Filenames and directory names with the Danish ,
    > & (ae, oe & aa), e.g the filename bger.doc (bger = books) is shown as
    > b. and when clicking the file the file disappears from the file list. It
    > seems to be the same problem with the German (umlaub). What to do?
    As far as I know, the Novell Client for Linux expects that file and
    directory names use the UTF-8 encoding and does not support a traditional
    8-bit encoding like ISO 8859-1. Try changing the encoding of file and
    directory names to UTF-8 as described in
    SDB:Converting Files or File Names to UTF-8 Encoding - openSUSE
    HTH,
    Ray Dassen
    Technical Support Engineer, EMEA Services Center, Novell Technical Services
    Novell, Inc. Software for the Open Enterprise Software for the Open Enterprise
    Seems a good hint. When I create a folder or file from within SUSE using an "Umlaut" everything is OK and NCL 2.0 displays them correctly as they are UTF-8 formatted.
    The proposed tool is no solution: one cannot convert folders or files that one cannot see (does it work for folders at all?). Maybe a windows tool would work because one could search for all files or folders with "Umlaute" and convert them. Other options?

  • Does simple file and folder sharing on an iMac work with OSX Server?

    Hi There
    I wonder if I should install OSX Server on an iMac wher several users work on the same files and folders.
    My question - before I do something I might regret:
    Does simple file and folder sharing on an iMac within several users really work with the help of OSX Server?
    All I want to be able to do:
    Admin creates a new folder1 and gives it read- and write access for user1 and user2.
    User1 creates a subfolder1 in folder1, and a document1 in subfolder1.
    User2 edits document1. Later Admin edits document1.
    All these simple editing of files and folders (and subfolders) within a main folder should be possible. This is not possible now.
    Is everything clear? I'm not a network specialist or something, I just want to give some co-workers access to some data on my computer without problems.

    So what you need are recursive permissions.
    I suggest you create a group and add user1 and user2 to that group. You can name that group whatever you want, but for now i will call it FSUsers
    Execute this in terminal. Replace FSUsers with your new group
    sudo chmod -R +a "FSUsers allow list,add_file,search,add_subdirectory,delete_child,readattr,writeattr,readextat tr,writeextattr,readsecurity,file_inherit,directory_inherit" /Users/Shared/*
    Replace /Users/Shared with the location of your shared folder. Make sure you keep the /* at the end (this allows all subfolders and files to get the same permissions.
    If you need to add people to the share just add them to the FSUsers group, the FSUsers group should should also be allowed in the sharing preferences.

  • I have a folder and 3 files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked?

    I have an empty folder and 3 .jpg files stuck on my desktop.  When I drag them to the trash I am asked to enter my administrator's password.  I do this but the files and folder will not delete.  I have checked 'Get Info' on each of them and they are not locked and I have full read & write access.  Grateful for any assistance in solving this problem.

    Back up all data.
    Triple-click anywhere in the line below to select it:
    ls -@Oaen De* | open -f -a TextEdit
    Copy the selected text to the Clipboard (command-C).
    Launch the Terminal application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.
    Paste into the Terminal window (command-V).
    A TextEdit window will open with the output of the command. Post the contents of that window, if any — the text, please, not a screenshot. The title of the window doesn't matter, and you don't need to post that.
    If any personal information appears in the output, anonymize before posting, but don’t remove the context.

  • Use Automator to move files and folder structure to another folder, retaining destination contents

    I have been struggling trying to setup Automator to move files and folder structure to another folder, retaining the destination contents.  Basically, I need to add files at the destination, within the same folder structure that exists at the source.  Here's some details about the scenario:
    -I have PDF files that I create on a seperate computer than I my daily use machine
    -For security reasons, the source computer doesn't have access to any shares on the destination computer
    -The destination computer has access to shares on the source computer
    -I want to delete the original PDFs at the source after they are moved or copied
    I haven't been able to get Automator to move or copy the folder contents (files and subfolders) without dropping everything copied at the top level of the destination, resulting in many duplicate folders and a broken folder structure.
    So far I've only had luck getting this to work at the command line, but I'd really like to have this setup in Automator so that I could have either a service or application that I could use for any folder, prompting for the source and destination folders.  I'm a relatively new Mac user with limited Linux experience, so this is the command that I've cobbled together and currently accomplishes what I'm looking for:
    ditto /Volumes/SMB_Temp/SOURCE ~/Desktop/Documents/DESTINATION
    cd /Volumes/SMB_Temp/SOURCE
    find . -type f -name "*.pdf" -exec rm -f {} \;
    Thanks for any ideas!

    If you have a command-line syntax that works, why not just create an Automator workflow with a single 'Utilities -> Run Shell Script' action, where that action has your (working) shell commands?
    Seems way, way simpler to me than trying to reinvent the wheel and transcribe shell commands into individual Automator actions

  • Applescript: choose file AND folder (multiple selection allowed)

    Hi all;
    is there any way to select files and folder with and apple script?
    I'm trying to write something to compress some stuff and I'd need this stuff to be both files and folders at once…
    Thank you!

    Plain AppleScript doesn't have that kind of dialog, but you can access various Cocoa methods in Snow Leopard and Lion.  In Lion, you create a Cocoa-AppleScript Applet from a template in the AppleScript Editor, where you can use AppleScriptObjC statements.  Since the script can only be run in the application and not the AppleScript Editor though, it is a little bit of a pain to troubleshoot - Shane Stanley has written an ASObjC Runner background application that can be run from the AppleScript Editor, if you wanted to check that out.
    Running the Cocoa-AppleScript template, you can use something like the following - see the NSOpenPanel Class Reference for other methods and settings:
    set defaultDirectory to POSIX path of (path to desktop) -- a place to start
    tell current application's NSOpenPanel's openPanel()
      setFloatingPanel_(true)
      setTitle_("Choose some stuff:")
      setPrompt_("Choose") -- the button name
      setDirectoryURL_(current application's NSURL's URLWithString_(defaultDirectory))
      setCanChooseFiles_(true)
      setCanChooseDirectories_(true)
      setShowsHiddenFiles_(false)
      setTreatsFilePackagesAsDirectories_(false)
      setAllowsMultipleSelection_(true)
      set theResult to it's runModal() as integer -- show the panel
      if theResult is current application's NSFileHandlingPanelCancelButton then quit -- cancel button
      set theFiles to URLs() as list
    end tell
    repeat with X from 1 to (count theFiles) -- coerce the file paths in place
      set (item X of theFiles) to (item X of theFiles)'s |path|() as text -- as POSIX file
    end repeat
    choose from list theFiles
    if result is false then quit

  • TS4153 few files and folder are not deleting from trash folder

    i am trying to delete all files and folders from the trash folder by clicking  empty securely, but its not deleteing the files anf folder. please suggest how to clean the trash folder by deleteing all the deleted files and folder.

    Securely deleting items in Trash writes Zeros over the data so that it is completely eradicated.
    This will take quit a long time depending on how much data you have in Trash.
    Unless there is data that needs to be rendered unrecoverable in the Trash, you could choose to just delete the files and folders with out the secure option.
    Once you have Emptied the Trash unsecurely you can always use disk utility to Securely Erase Free Space on the Drive.

  • Hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac, hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac

    hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac, hi ! i am using mac air i download from app store IDESKTOP when i open it its delete all my file and folder on my mac

    Here you can contact the developer.
    (Notice, I'm posting this line only once. Not 4 times. )

  • File and folder permissions for Adobe Photoshop CS5

    Good day,
    I am an IT specialist and I work for a Canadian governement agency and we are having an issue with Photoshop CS5. After successfully installing Photoshop CS5 from the Adobe Creative Suite 5 Design Premium set(using a local machine administrator account), Photoshop crashes immidiatly after launching it(even with the local administrator account). The exact error message is as follows:
    The instruction at "0x230dad8dc" referenced memory at "0x00000000". The memory could not be "read".
    Click on OK to terminate the program
    Click on CANCEL to debug the program
    I know this is an environement issue and not an application or hardware issue since I was able to successfully install and run Adobe Photoshop CS5 on a plain vanilla install of Windows SP3 XP on the same model of workstation(HP DC7800). This later also confirms it is not a RAM or video adapter issue either. My experience tells me it would be more related to file/folder permissions on the workstation(although I'm open to other suggestions).  Because we are a governement agency, our workstations have machine and user policies and desktop configurations that get applied to the workstations automatically upon joining our domain via GPOs and SMS. Certain system files and folder permissions may be locked down for security reasons therefor I was wondering is someone has a list of files and folders that Adobe CS5 needs access to upon startup in order to properly function?
    If anyone would like more details or information please let me know and I'll try to be more specific.
    Thanks in advance to all who take the time to read and help out!

    I appreciate that you're trying to surmise what's different, and it's good that you have had success with similar/identical hardware.  At least you know it can work.
    However, I wouldn't bet just yet that it's a permissions issue.  I'd think you should get a specific error if a locked-down file needed to be accessed, not a null pointer crash.  The Photoshop installer should be setting up the proper permissions on its own files for it to run.
    Is it exactly the same video card as the other computer, on which Photoshop works?
    Are you sure the video drivers are up to date with the same version as on the other computer?
    At exactly what point during startup does the failure occur (i.e., is the splash screen showing, and what does the status line in the splash screen say it's doing)?
    -Noel

  • Word and Excel file and folder icons missing in File Open dialog box

    Running office 365 on Windows 7 Pro: In Word and Excel, when opening and browsing for files in the file Open dialog box, all file and folder icons are missing.  This problem does not occur within Windows Explorer.

    Can you open Word/Excel files normally?
    Go to File>Advanced>Disable hardware graphics acceleration
    Start Office in safe mode to troubleshoot the issue:
    http://office.microsoft.com/en-001/support/why-cant-i-start-my-office-2013-application-HA104011864.aspx
    If the issue persists, do a repair for your Office suites in Control panel>Program and features>Office>Change>Repair
    Tylor Wang
    TechNet Community Support

  • Mac CAN't Cut files and folder???

    i'm new Mac user!
    My Mac CAN't Cut files and folder! is it normal? just copy, then delete orig.
    or use drag with OPT key. But i can't use CMD+X or CUT in EDIT menu.

    I have been having the same problem, and thought it was just me. Had the same problem with deleting files/folders in Finder...till I found you have to hold the cmd key down while deleting.
    Was hoping there was a keyboard shortcut for copy as well.
    Really infuriating, what would be a CMD-X, move mouse, CMD-V operation becomes a copy, navigate to new folder/move to new window, paste, go back to other window, re select and delete operation.
    My work around is to use Windows Explorer in unity mode in VMWareFusion if I am doing any major search/move/cut operations.
    Saves having to have multiple windows open/going back/forwards, between them.
    I did see a terminal hack that enabled the CMD-X keyboard shortcut....but it just deletes to the Trash Bin and does not actually paste the items back.
    Can understand the reasons nerowolfe states, but that does not stop it from being b**y annoying

Maybe you are looking for

  • Apple is right to let Aperture go

    After at first being a little surprised at Aperture’s demise it occurred to me that Apple is right to do this. Continuing to develop an app with small market share on an operating system with small market share makes little sense. It is better for th

  • Plug in errors

    I am using Adobe Acrobat 7.0. It has been working fine, until late yesterday morning. Now when I open it, I get the following messages: error loading plug-in 'catalog.api' failed to initiate error loading plug-in 'JDFProdDef.api failed to initiate er

  • Mac Mini rez is messed up after update....

    I have last gen C2D Mac Mini hooked to my 37" 720 LG TV through the DVI > HDMI. I only use the Mini for music and movies though NetFlix etc. Last night I did updates to OSX etc and after reboot my rez is all messed up. Apple toolbar just slightly off

  • Select from a table from other schema

    Hi, I want to make a select from a table how is into other Schema and into other instance. form example, if I have _2 schemas (in diferent instances)_: SCHEMA1 = *(DESCRIPTION =* *(ADDRESS =* *(PROTOCOL = TCP)* *(HOST = XXX.XXX.XXX.XX1)* *(PORT = 156

  • Import Po tracking

    Hi all, I have one doubt regarding Import PO tracking How  can end user enter following details (dates) in PO. Client want following tracking details Date of PO received by vendor.(Vendor Acknowledgment). Vendor will send expected date of depature (E