<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>YutaKa</author_name>
  <author_url>https://blog.hatena.ne.jp/YutaKa/</author_url>
  <blog_title>YutaKaのPython教室</blog_title>
  <blog_url>https://www.yutaka-note.com/</blog_url>
  <categories>
    <anon>pathlib</anon>
    <anon>Pythonで効率化</anon>
  </categories>
  <description>Pythonのファイル操作用のモジュールpathlibというものがあります。pathlibを使用すれば、特定のパスからファイル名やフォルダ名、拡張子を抽出するのも簡単です！しかし、実際に使用する際には、次のような問題に直面することも：①ファイル名やフォルダ名を抽出するときは、どうするの？②拡張子だけ抽出することもできる？こういった疑問を解決するために、この記事ではpathlibのフォルダ名やファイル名等の抽出方法を図解付きで解説していきます。</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fwww.yutaka-note.com%2Fentry%2Fpathlib_filename&quot; title=&quot;Pathからフォルダ名、ファイル名、拡張子を抽出 - YutaKaのPython教室&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://cdn-ak.f.st-hatena.com/images/fotolife/Y/YutaKa/20221120/20221120203702.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-11-20 20:45:08</published>
  <title>Pathからフォルダ名、ファイル名、拡張子を抽出</title>
  <type>rich</type>
  <url>https://www.yutaka-note.com/entry/pathlib_filename</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
