1. You are viewing our forum as a guest. For full access please Register. WindowsBBS.com is completely free, paid for by advertisers and donations.

Windows Vista ftp put fails when run in Vista Task Scheduler

Discussion in 'Legacy Windows' started by MorrisK, 2009/08/26.

  1. 2009/08/26
    MorrisK

    MorrisK Inactive Thread Starter

    Joined:
    2009/08/26
    Messages:
    2
    Likes Received:
    0
    I'm having an odd problem and can't figure it out.

    I have the following command in a .bat file named C:\Jobs\UploadTest.bat.

    ftp -s:C:\Jobs\TestUp.txt >> C:\Jobs\ftplog.log

    The following is the contents of the TextUp.txt file

    open ftp.locationname.com
    username
    password
    cd /Inbound
    bin
    hash
    put TestCSV.csv
    disconnect
    quit


    If I run UploadTest.bat manually (double click) everything works fine and I get the following results in ftplog.log.

    open ftp.locationname.com
    220 Hello, I'm freeFTPd 1.0

    331 Password required for username

    230 User username logged in
    cd /Inbound
    250 CWD command successful
    bin
    200 TYPE set to BINARY
    hash
    put TestCSV.csv
    200 PORT command successful
    150 Opening BINARY mode data connection

    226 File upload OK
    0.0086000.00disconnect
    221 Goodbye!
    quit


    If I set up a Windows scheduled task to run C:\Jobs\UploadTest.bat it fails. Here are the results in the log.

    open ftp.locationname.com
    220 Hello, I'm freeFTPd 1.0

    331 Password required for username

    230 User username logged in
    cd /Inbound
    250 CWD command successful
    bin
    200 TYPE set to BINARY
    hash
    put TestCSV.csv
    TestCSV.csv: F
    disconnect
    221 Goodbye!
    quit


    Does anyone know what might be going wrong?

    I'm an administrative user, the task is set to run with highest privileges using my account.

    Thanks
     
  2. 2009/08/26
    PeteC

    PeteC SuperGeek Staff

    Joined:
    2002/05/10
    Messages:
    28,896
    Likes Received:
    389
    Welcome to WindowsBBS :)

    It'a a toss up as to whether this should be in the Vista forum or Networking - the coin came down Vista side up :) Moved to that forum.
     

  3. to hide this advert.

  4. 2009/08/26
    TonyT

    TonyT SuperGeek Staff

    Joined:
    2002/01/18
    Messages:
    9,072
    Likes Received:
    400
    In your scheduled task try this string:

    cmd /c C:\Jobs\UploadTest.bat

    You need to precede the bat file path with cmd /c. The /c will close the command window when finished.
     
  5. 2009/08/27
    MorrisK

    MorrisK Inactive Thread Starter

    Joined:
    2009/08/26
    Messages:
    2
    Likes Received:
    0
    Hi Tony,

    I tried your suggestion but it didn't help.

    Here's the result from the log.

    open ftp.locationname.com
    220 Hello, I'm freeFTPd 1.0

    331 Password required for username

    230 User username logged in
    cd /Inbound
    250 CWD command successful
    bin
    200 TYPE set to BINARY
    hash
    put TestCSV.csv
    TestCSV.csv: F
    disconnect
    221 Goodbye!
    quit

    Any other suggestions?

    Thanks,

    Kevin
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.