<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>merrywhite</author_name>
  <author_url>https://blog.hatena.ne.jp/merrywhite/</author_url>
  <blog_title>CAFE BREAK</blog_title>
  <blog_url>https://cafebreak.hatenablog.com/</blog_url>
  <categories>
    <anon>スクリプト</anon>
  </categories>
  <description>日付を変えて同じようなコマンドを実行する場合、毎回手動で日付フォルダを作成するのが面倒なことがあります。 その他、定期実行するログを日付フォルダ毎に格納させたい場合などに、yyyymmdd形式でフォルダを作成する場合に便利なpowershellスクリプトです。 まず、日付を取得するスクリプトがこちらです。変数に格納します。 $get_date = Get-Date -Format &quot;yyyyMMdd&quot; 続いて参考になったコマンド情報です。 $path = &quot;C:\temp\NewFolder&quot;If(!(test-path -PathType container $path)){ New-Ite…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fcafebreak.hatenablog.com%2Fentry%2F2025%2F01%2F11%2F000000&quot; title=&quot;Powershell yyyymmddの日付フォルダが存在しなければフォルダを作成するスクリプト - CAFE BREAK&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://www11.a8.net/0.gif?a8mat=1NWF4B+CR1C1M+249K+BWGDT</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-01-11 00:00:00</published>
  <title>Powershell yyyymmddの日付フォルダが存在しなければフォルダを作成するスクリプト</title>
  <type>rich</type>
  <url>https://cafebreak.hatenablog.com/entry/2025/01/11/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
