Your best friend for file transfer.

Fetch application logoFetch

Error uploading files when using AppleScript (3 posts)

This is an archived topic. The information in it is likely to be out-of-date and no longer applicable to current versions of Fetch.
  • Started 12 years ago by ravedog
  • Latest reply 12 years ago from ravedog
  • ravedog Member

    using Fetch 4.0.2
    OS X 10.1.5

    have this AS that allows me to slect an item in the finder and upload it to a sever. prob is i get an error: -30000, unexpected server response.

    the fetch transcript shows:
    250 CWD OK, "/mxm.com/screensnaps/proteus/".
    TYPE I
    200 Using MacBinary mode to transfer files.
    MACB DISABLE
    200 MacBinary mode disabled.
    PORT 24,148,54,202,111,72
    200 PORT OK, IP address 24.148.54.202 port 28488
    STOU Services_20020625.jpg
    502 Command "STOU Services_20020625.jpg" not implemented.
    ftp_store_setup: -30000 (state == RPUT_SETTING_UP)
    ABOR
    CStreamOT::Read() OTRcv() returned -3208
    200 ABOR OK.

    property destinationHost : "ftp.server.com"
    property myUserName : "user"
    property myPassword : "password"
    property destination_Dir_Final : "/files/"

    tell application "Finder" to set the item_list to selection

    with timeout of 60000 seconds

    tell application "Fetch 4.0.2"
    activate
    try
    make new transfer window at front with properties ¬
    {hostname:destinationHost, userid:myUserName, password:myPassword, initial directory:destination_Dir_Final}

    repeat with aFile in theList
    put into transfer window destinationHost item aFile as alias format Raw Data with uniquename
    end repeat

    close transfer window destinationHost

    on error errMsg number errNum
    display dialog "Fetch got an error " & errNum & return & return & errMsg
    return
    end try

    end timeout

    The script logs in ok and into the correct directory... the prob comes when uploading it.

    [This message has been edited by ravedog (edited 06-25-2002).]

    Posted 12 years ago #

  • Jim Matthews Administrator

    The server does not support the "STOU" (store unique) command; that's the command Fetch uses to upload a file while making sure that it won't overwrite an existing file with the same name. So you need to remove "with uniquename" from the line in the script that starts "put into transfer window..." -- without that qualifier Fetch will use the regular upload command (STOR) instead of STOU.

    Thanks,

    Jim Matthews
    Fetch Softworks

    Posted 12 years ago #

  • ravedog Member

    Originally posted by JimMatthews:

    The server does not support the "STOU" (store unique) command; that's the command Fetch uses to upload a file while making sure that it won't overwrite an existing file with the same name. So you need to remove "with uniquename" from the line in the script that starts "put into transfer window..." -- without that qualifier Fetch will use the regular upload command (STOR) instead of STOU.

    Thank you very much. This worked!

    Posted 12 years ago #

Topic closed

This topic has been closed.