#author("2019-04-08T13:01:18+00:00","default:admin","admin")
#author("2019-06-20T03:55:33+00:00","default:admin","admin")
-[[開発に役立つ,BATファイルの書き方・パターン集 (コマンドプロンプトの定石を体系的に学び,バッチ中級者になろう):https://language-and-engineering.hatenablog.jp/entry/20130502/PatternsOfMSDOSorBAT#VariablesAndCalculation]]

-[[Windows PowerShellを使ってデータファイルを圧縮するバッチを作成してみた:https://www.casleyconsulting.co.jp/blog/engineer/233/]]

-[[簡易バックアップの世代管理:https://plaza.rakuten.co.jp/tebukko/diary/201209030000/]]

*Tips [#ld93ca8b]
**日付・時間 [#nced1683]
-[[バッチファイルで日付(yyyymmdd)、時間(hhmiss)を取得する:https://kuroeveryday.blogspot.com/2014/02/GetDateTime.html]]
--年
 %DATE:~-10,4%
--月
 %DATE:~-5,2%
--日
 %DATE:~-2%
--時
 %TIME:~0,2%
--分
 %TIME:~3,2%
--秒
 %TIME:~6,2%

-1週間前の日付の文字列を取得
--[[バッチとPowerShellで昨日の日付を取得する:https://www.greptips.com/posts/801/]]
 FOR /F "usebackq delims=" %%a in (`powershell "(get-date).AddDays(-7).ToString(\"yyyy-MM-dd\")"`) do Set TARGET_DATE=%%a

**ファイル検索 [#g3e883bb]
-[[windosの指定日付より前のファイルを削除する:https://qiita.com/gitya107/items/a11deb3d83d8d624175c]]


トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS