Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: how to run an ftp script silently?  (Read 39982 times)

0 Members and 1 Guest are viewing this topic.

inciravek

    Topic Starter


    Newbie

    • Experience: Beginner
    • OS: Windows 10
    how to run an ftp script silently?
    « on: September 24, 2021, 03:07:29 PM »
    Hi all, so I am trying to run a batch file to upload file via ftp using an ftp utility called cmdftp. It is almost the same as window's native ftp. I know how to run the batch file silently, but the batch file calls a text script that I don't know how to hide (so whenever this file runs, the command line windows will pop up until it is finished)

    the batch file is (you can actually replace cmdftp with ftp)
    Code: [Select]
    cmdftp -s:ftpscript.txt -d:"Log.txt"
    the script is

    Code: [Select]
    open ftp.drivehq.com
    USERNAME
    xxxxxxxxx
    cd test
    delete orders.xml.bak
    rename orders.xml orders.xml.bak
    put c:\test\orders.xml
    quit

    I think i need to add something to the script file to make it run silently but I don't know what, @echo off doesn't work. Any help is greatly appreciated!

    Squashman



      Specialist
    • Thanked: 134
    • Experience: Experienced
    • OS: Other
    Re: how to run an ftp script silently?
    « Reply #1 on: September 28, 2021, 07:24:40 AM »
    Did you try redirecting everything to NUL?

    Code: [Select]
    @cmdftp -s:ftpscript.txt > NUL 2>&1