Your best friend for file transfer.

Fetch application logoFetch

allowable password characters in a scripted fetch application (5 posts)

  • Started 9 years ago by tcpms
  • Latest reply 9 years ago from tcpms
  • tcpms Member

    It seems that certain special characters in a password will not work in a scripted Fetch application:
    The password in question has a '#' character.
    The script successfully connects with:
    "ftp://<username>::<pwd with '#'>@<host name>"
    and successfully executes this apple script step:
    make new remote folder at beginning with properties {name:"<folder name>"}
    But for this step:
    set myftp to "ftp://<username>::<pwd with '#'>@<host name>"
    put into url myftp item alias itemalias
    I get this result:
    error "Fetch got an error: Can’t get url ............

    Is the '#' character the problem? Do other characters also cause problems?

    Posted 9 years ago #

  • Jim Matthews Administrator

    Some characters have to be encoded in URLs. Try replacing the # character in the URL with %23 -- does that work?

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 9 years ago #

  • tcpms Member

    That does solve the problem - for this character.

    Is there a list of characters that require this solution? And others that should be avoided: I know the '*' does not require the encoding. It works just fine. And the '@' looks like it should be avoided since it looks like it would create ambiguity when parsing the text.

    Since I will have to re-program my application to accommodate this nuance, I'd like to do it right - and completely - the first time!

    Thanks

    Posted 9 years ago #

  • Jim Matthews Administrator

    Hi,

    According to RFC 2396, the characters that do not require encoding ("Unreserved characters") are:

    ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_.!~*'()

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 9 years ago #

  • tcpms Member

    Thank you!

    Posted 9 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.