カテゴリー:
Chromeブックマーク
閲覧数:456 配信日:2018-05-02 21:02
2018-5/2 → 5/4
出力先フォルダ指定
▼L:\desktop\chrome_bookmark_backup.bat
@ECHO OFF
cd "L:\2_Hp_data\bat_chrome_bookmark_backup"
mkdir %date:~-10,4%%date:~-5,2%%date:~-2,2%
cd %date:~-10,4%%date:~-5,2%%date:~-2,2%
copy "C:\Users\□□\AppData\Local\Google\Chrome\User Data\Default\Bookmarks.bak"
copy "C:\Users\□□\AppData\Local\Google\Chrome\User Data\Default\Bookmarks"
5/4 → 5/7
日付の新しいフォルダ3つ以外を削除
▼L:\2_Hp_data\bat_chrome_bookmark_backup\batch_20180507\powershell.bat
@ECHO OFF
cd "L:\2_Hp_data\bat_chrome_bookmark_backup"
mkdir %date:~-10,4%%date:~-5,2%%date:~-2,2%
cd %date:~-10,4%%date:~-5,2%%date:~-2,2%
copy "C:\Users\□□\AppData\Local\Google\Chrome\User Data\Default\Bookmarks.bak"
copy "C:\Users\□□\AppData\Local\Google\Chrome\User Data\Default\Bookmarks"
cd "L:\2_Hp_data\bat_chrome_bookmark_backup"
for /f "skip=3" %%A in ('dir /b /o-n') do rd /s /q "%%A"
5/7 →
「更新日時」が3日以前を削除
▼L:\2_Hp_data\bat\20180507-chrome-backup\chrome_bookmark_backup.bat
@echo off
cd "L:\2_Hp_data\bat_chrome_bookmark_backup"
mkdir %date:~-10,4%%date:~-5,2%%date:~-2,2%
cd %date:~-10,4%%date:~-5,2%%date:~-2,2%
copy "C:\Users\□□\AppData\Local\Google\Chrome\User Data\Default\Bookmarks.bak"
copy "C:\Users\□□\AppData\Local\Google\Chrome\User Data\Default\Bookmarks"
cd "L:\2_Hp_data\bat_chrome_bookmark_backup"
forfiles /P "L:\2_Hp_data\bat_chrome_bookmark_backup" /D -3 /C "cmd /c if @isdir==TRUE rd /s /q @path"