2020年07月10日
[バッチファイル] ファイルのバックアップ
20世代のファイルのバックアップを作成。
バッチファイル。タスクスケジュールなどで処理を実行する。
バッチファイル。タスクスケジュールなどで処理を実行する。
rem ◆サーバーにあるファイルをフォルダ単位にローカルにBackup
rd /s/q c:\backup\km_backup_20
ren "c:\backup\km_backup_19" "km_backup_20"
ren "c:\backup\km_backup_18" "km_backup_19"
ren "c:\backup\km_backup_17" "km_backup_18"
ren "c:\backup\km_backup_16" "km_backup_17"
ren "c:\backup\km_backup_15" "km_backup_16"
ren "c:\backup\km_backup_14" "km_backup_15"
ren "c:\backup\km_backup_13" "km_backup_14"
ren "c:\backup\km_backup_12" "km_backup_13"
ren "c:\backup\km_backup_11" "km_backup_12"
ren "c:\backup\km_backup_10" "km_backup_11"
ren "c:\backup\km_backup_09" "km_backup_10"
ren "c:\backup\km_backup_08" "km_backup_09"
ren "c:\backup\km_backup_07" "km_backup_08"
ren "c:\backup\km_backup_06" "km_backup_07"
ren "c:\backup\km_backup_05" "km_backup_06"
ren "c:\backup\km_backup_04" "km_backup_05"
ren "c:\backup\km_backup_03" "km_backup_04"
ren "c:\backup\km_backup_02" "km_backup_03"
ren "c:\backup\km_backup_01" "km_backup_02"
mkdir "c:\backup\km_backup_01"
xcopy /d/e/y/i/r "\\Server\共有フォルダ\aaaaaaa" "c:\backup\km_backup_01\aaaaaaa"
xcopy /d/e/y/i/r "\\Server\共有フォルダ\bbbbbbb" "c:\backup\km_backup_01\bbbbbbb"
xcopy /d/e/y/i/r "\\Server\共有フォルダ\ccccccc" "c:\backup\km_backup_01\ccccccc"
rem ◆ローカルにあるファイルをフォルダ単位にサーバーにBackup
rd /s/q "\\Server\共有フォルダ\backup\km_backup_20"
ren "\\Server\共有フォルダ\backup\km_backup_19" "km_backup_20"
ren "\\Server\共有フォルダ\backup\km_backup_18" "km_backup_19"
ren "\\Server\共有フォルダ\backup\km_backup_17" "km_backup_18"
ren "\\Server\共有フォルダ\backup\km_backup_16" "km_backup_17"
ren "\\Server\共有フォルダ\backup\km_backup_15" "km_backup_16"
ren "\\Server\共有フォルダ\backup\km_backup_14" "km_backup_15"
ren "\\Server\共有フォルダ\backup\km_backup_13" "km_backup_14"
ren "\\Server\共有フォルダ\backup\km_backup_12" "km_backup_13"
ren "\\Server\共有フォルダ\backup\km_backup_11" "km_backup_12"
ren "\\Server\共有フォルダ\backup\km_backup_10" "km_backup_11"
ren "\\Server\共有フォルダ\backup\km_backup_09" "km_backup_10"
ren "\\Server\共有フォルダ\backup\km_backup_08" "km_backup_09
ren "\\Server\共有フォルダ\backup\km_backup_07" "km_backup_08"
ren "\\Server\共有フォルダ\backup\km_backup_06" "km_backup_07"
ren "\\Server\共有フォルダ\backup\km_backup_05" "km_backup_06"
ren "\\Server\共有フォルダ\backup\km_backup_04" "km_backup_05"
ren "\\Server\共有フォルダ\backup\km_backup_03" "km_backup_04"
ren "\\Server\共有フォルダ\backup\km_backup_02" "km_backup_03"
ren "\\Server\共有フォルダ\backup\km_backup_01" "km_backup_02"
mkdir "\\Server\共有フォルダ\backup\km_backup_01"
xcopy /d/e/y/i/r "C:\ddddddd" "\\Server\共有フォルダ\backup\km_backup_01\ddddddd"
xcopy /d/e/y/i/r "C:\eeeeeee" "\\Server\共有フォルダ\backup\km_backup_01\eeeeeee"
xcopy /d/e/y/i/r "C:\fffffff" "\\Server\共有フォルダ\backup\km_backup_01\fffffff"
【このカテゴリーの最新記事】
-
no image
-
no image
この記事へのトラックバックURL
https://fanblogs.jp/tb/10016130
※ブログオーナーが承認したトラックバックのみ表示されます。
この記事へのトラックバック