LoginSignup
0
1

More than 5 years have passed since last update.

日付を取得するDOSコマンド

Last updated at Posted at 2017-10-11

日付を取得して文字列にする

よく使う割に思い出すのが面倒なのであとでコピペできるように書いておく。

dcdiagコマンド部分はおまけ。
このコマンドはActiveDirectoryサーバのみです。

getdate.bat
set ymd=%date:~0,4%%date:~5,2%%date:~8,2%
echo %ymd%

dcdiag /a /c >%userprofile%\desktop\dcdiag_%ymd%.txt

実行結果

dcdiag_yyyymmdd.txt というファイル名のActiveDirectoryの診断結果が作成される。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1