1.

Solve : How To Move Then Delete SQL Dump File?

Answer»

I am trying to use a batch script to move a SQL dump from 1 server to a different one. The script I'm using will create the file and copy it but when I try using the MOVE command it only creates the file. I've INCLUDED the script below, any thoughts on how I can do this?

ECHO OFF

set TIMESTAMP=%DATE:~10,4%%DATE:~4,2%%DATE:~7,2%

REM Export all databases into file C:\DB Backups\backup\docuware.[year][month][day].sql
"C:\Program Files (x86)\DocuWare\Internal Database V2\bin\mysqldump.exe" --all-databases --result-file="C:\DB Backups\docuware.%TIMESTAMP%.sql" --user=admin --password=xxxxxxxx

REM Change working directory to the location of the DB dump file.
C:
CD \DB Backups

COPY "C:\DB Backups\" "E:\DW_PROD\Database Backups\



He hasn't been BACK in ALMOST 2 YEARS...Why you need a script to move file.
use robocopy it has many options to do that.



Discussion

No Comment Found