Home > OS >  Batch uploaded to the FTP, and remove the rar file before 7 days
Batch uploaded to the FTP, and remove the rar file before 7 days

Time:09-23

Server will BackUp the database every day 1.10, compressed into a rar file, stored on F: \ MSSQL \ \ directory (date file name is already generated)

Now there is another server 1.20 with FTP, user name: adminuser password: asdjkl0123
1, now is a day to achieve 1.10 generated rar files uploaded to the FTP in 1.20 SQLbak folder (upload the rar file only)
2,1.20 file on the FTP SQLbak folder in the can pile up, need to delete 7 days before the rar file

CodePudding user response:

Understand,,,,,,,,

CodePudding user response:

Delete 7 days before the rar file in Windows system, can use forfile command implementation

CodePudding user response:

Forfiles/p X: \ \ directory/m * * 7/c - d - "del CMD/c/f @ path"

CodePudding user response:

This is a classic problem: Windows in batch, and then perform on a regular basis; Linux an executable file written in the shell, and then the cron to establish an execution plan

CodePudding user response:

Treatment method
  • Related