Your best friend for file transfer.

Fetch application logoFetch

Prohibited File Name Help (14 posts)

  • Started 14 years ago by Jim Mason
  • Latest reply 14 years ago from Jim Mason
  • Jim Mason Member

    Hi Friends,

    I get this error message that I believe relates to the ' in the file name. can I fix this in fetch or do I have to rewrite the code on the server so it changes them before they go to fetch?
    http://www.onlinesongmasters.com/ProhibitedFileName.tiff

    I thought the one preference setting to encode and decode file name would do the trick but to no avail (:
    http://www.onlinesongmasters.com/FetchPreferences.tiff

    Edited 14 years ago #

  • Scott McGuire Administrator

    Hi Jim,

    Yes, it looks like either the backslash \ or the single quotemark ' is causing the error; the server doesn't like one or both of those characters in filenames.

    To be clear, this error is coming from the server - Fetch doesn't care what characters are in your file names; when it tries to put the file on the server, by default Fetch just passes along the name you gave the file and asks the server to put a file with that name. The server, however, may then tell Fetch that it doesn't like the filename, resulting in this error.

    In general, you need to rename your files before uploading them with Fetch. If you are uploading a single file, you can use the Put command and enter a new name for the uploaded file to have, but if you have multiple files that have backslashes or quotes in them, you need to rename them on your Mac before trying to upload them.

    And yes, if you have code or webpages on the server that expect the filenames to include the backslashes and quotes, you'll need to change that code to expect the revised names you give the files.

    Fetch will adjust certain characters in filenames when uploading when the "Encode and decode file names" preference is checked. However, backslashes and single quotes are not among the characters affected by that preference (as you discovered).

    I hope this clarifies things, please let us know if you have further questions.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 14 years ago #

  • Jim Mason Member

    OK Scott thanks, this is more for performing backups. these files would actually be uploaded from the website so I would have no control over the file titles. It looks like I will just have to have the developers program a work around for this.

    will be purchasing fetch tomorrow as my trial runs out. wish me luck :)

    Jim M

    Posted 14 years ago #

  • Scott McGuire Administrator

    Hi Jim,

    I apologize, I see you were trying to download, not upload, so some of what I said was not quite correct. (Sorry, usually we get people asking about this sort of problem when they are uploading.)

    Here's what's going on in your case:

    * Fetch asks the server for a list of files on the server.
    * The server sends Fetch the list of file names. Some of these names apparently include \' .
    * When you're downloading, since the server told Fetch the name of the file included \' , that is what Fetch asks for.
    * But then the server tells Fetch that's a prohibited filename, even though the server has allowed such a filename to be created and told Fetch that is the name of the file.

    There isn't anything Fetch can do in this case, since it's just using the names the server gave it and the server is the one giving the error; as you say, you'll have to either make sure the files are not created with those names, or see if the FTP server software on the computer can be upgraded/changed/replaced with one that doesn't mind the filenames you are using.

    (And the "Encode and decode filenames" preference doesn't apply, because it only attempts to decode a certain kind of name encoding when downloading files, and your filenames are not using that encoding method. I don't know that you want to try to encode the filenames such that this preference would work - it would be better to just not include those characters in filenames, if possible - but you can read some more about this preference on the Miscellaneous Preferences help page.)

    Please let me know if you have further questions, and sorry for my somewhat incorrect initial reply.

    Best,

    Scott McGuire
    Fetch Softworks

    Posted 14 years ago #

  • Jim Mason Member

    Yeah, I think we will have to rig the code to change the file names when it encounters certain characters. I think the biggest flaw though is it will stop fetch from retrieving all the other files. If we could get the option to move on ahead without it that would be nice ....

    Posted 14 years ago #

  • Jim Mason Member

    but maybe just adding a stripslash command will do the trick, but what happens if someone uploads a file with arabic characters or chinese ? I guess the trick is to force a new name on all file uploads ?

    Posted 14 years ago #

  • Scott McGuire Administrator

    Hi Jim,

    Yes, we realize that sometimes it would be handy if Fetch would just skip over errors and keep downloading. That is something we'd like to implement in the future, but we do not have it now, sorry.

    Fetch works well with Arabic and Chinese characters, as long as the server supports them; and many do. (I am not sure if yours would or not.) The problem in your case is that your server has problems with particular characters in filenames. Most servers work just fine with filenames that have backslashes or quotes in them; so we would not want to remove them in general.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 14 years ago #

  • Jim Mason Member

    OK Scott, thanks a million, I will see if my hosting company can take a look at this problem for me. So far they have fixed everything that can be fixed for me and in matter of minutes not days. I would be remiss if I didn't give them a plug cause I sure do bug them a lot:
    http://www.servint.net/vps.php

    Jim M

    Posted 14 years ago #

  • Scott McGuire Administrator

    Okay, Jim, good luck, and thanks for the tip on hosting companies.

    Please let us know if you have further questions.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 14 years ago #

  • Jim Mason Member

    well, after some research it turns out that servint can't really do anything about the problem. I would have to have the developers rename the file on upload which perhaps isn't a big deal. although, I am not sure if other characters will cause the same problem.

    I have found FTP software that gives you the option to move on when encountering a problem like this. Although, ultimately, it can be annoying in itself to to do this after a while. especially if you had 100 files that had an apostrophe in it !

    Not sure where I go from here but I thought I would at least update you ..... seems like this would be a common problem with people that use Cpanel but I guess not.

    Posted 14 years ago #

  • Jim Mason Member

    oops, well this other unnamed software gives you the option to skip all errors while you are away and move on without them. not trying to stir trouble it is just that you may want to consider this option in the future.

    Posted 14 years ago #

  • Jim Mason Member

    ultimately this will be solved by adding a stripslash command in the php code, but me not smart enough :(

    Posted 14 years ago #

  • Scott McGuire Administrator

    Hi Jim,

    As I said before, yes, continuing downloading while ignoring errors is something we are considering for the future. However, even if we did that, or if you use software that does, the fact is you wouldn't end up with a complete copy of what's on the site - you'd be missing the files whose names have characters that the server has a problem with. And in most cases, that's not desirable; presumably you really do want every file from the folder you're downloading. So skipping over problem files isn't really a full solution.

    The real solution is to avoid using the problem characters in the file names, or find a different server that doesn't have the problem.

    To be sure that you don't run into problems with other characters, you'd want to stick to unaccented letters, numbers, and underctores in the file names. Anything else has the potential to be problematical, although again, servers differ on which characters cause a problem.

    Thanks,

    Scott McGuire
    Fetch Softworks

    Posted 14 years ago #

  • Jim Mason Member

    HI Scott,

    Yes, you are right. the only way to achieve this is to rig the code to rename the files on upload since I have no control over what the customer names the file. I just wanted to exhaust my possibilities so I didn't have to ask the programmers to do this. It is probably a quick fix on their part.

    Just beating a dead horse is all .

    Not sure where this leaves me as far as purchasing FTP software. I guess I will test them all and see which one suits my needs the best. I like fetch and seems to run nice and smooth (until encountering an error) and the support is top notch as demonstrated by this thread.

    Thanks, Jim M

    Posted 14 years ago #

Reply

  • Or nickname, if you prefer.
  • This will be kept confidential.
  • This is to ensure that you’re a person, not a spambot.