LoginSignup
0
0

More than 1 year has passed since last update.

PowreShellでyyyyMMdd_コンピュータ名のディレクトリを作成する

Posted at

はじめに

Windowsサーバで作業する際、作業フォルダに保存したエビデンスをまるっとコピーして別環境にまとめてもってくることが多々あります。
その際、フォルダに、作業日と日付が入っていると見分けやすくて便利です。

コマンド

New-Item -path C:\temp\ -name ($env:COMPUTERNAME + '_' + $(Get-Date).ToString("yyyyMMdd")) -type directory

C:\temp配下に、yyyyMMdd_コンピュータ名のフォルダが作成できました。

0
0
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
0