<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>shibainu55</author_name>
  <author_url>https://blog.hatena.ne.jp/shibainu55/</author_url>
  <blog_title>shibainu55日記</blog_title>
  <blog_url>https://shibainu55.hatenadiary.org/</blog_url>
  <categories>
    <anon>Windows</anon>
  </categories>
  <description>最近はWindowsプラットフォームを扱うことが多く、微妙にハマりそうな落とし穴もあったのでメモしておく。まずは基本から。取り出した環境変数の文字列の一部を置換する場合は、%環境変数名%の終端「%」の部分を「:X=Y%」とすることで、X⇒Yという文字列置換が行える。 例）「/」を「-」に置換する場合 C:\&gt;echo %date% 2010/03/24C:\&gt;echo %date:/=-% 2010-03-24さて、ここで注意が必要なパターン(僕はこれでハマりました)について触れておく。Windows環境変数には「%time%」というものがあり、現在時刻を表示するためバッチの中ではかなりよく使…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fshibainu55.hatenadiary.org%2Fentry%2F20100324%2F1269395622&quot; title=&quot; バッチの中でのWindows環境変数の取り扱いメモ - shibainu55日記&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2010-03-24 10:53:42</published>
  <title> バッチの中でのWindows環境変数の取り扱いメモ</title>
  <type>rich</type>
  <url>https://shibainu55.hatenadiary.org/entry/20100324/1269395622</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
