chrysst
chrysst

Reputation: 357

How to delete files from local machine using ftp command?

I am using the following ftp commands to transfer files from my local mashine to the remote mashine. After that I want to delete the files from the local mashine. Which command I should use for my case? The command must be inserted after mput .

open xx.xxx.xxx.xx
username
password
cd \path\to\remote\mashine
lcd \path\to\local\mashine
binary
mput *.*
disconnect
bye

Upvotes: 0

Views: 4693

Answers (1)

Alex K.
Alex K.

Reputation: 175876

  1. Move the local files to a temporary location before starting the FTP session

    move *.* TEMPDIR

  2. Upload them

    mput TEMPDIR\*.*

  3. Delete them when the FTP session ends

    del /q TEMPDIR\*.*

Upvotes: 2

Related Questions