{"width":"100%","description":"\u6307\u5b9a\u306e\u30d5\u30a9\u30eb\u30c0\u306e\u4e0b\u306b\u3042\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc \u518d\u5e30\u7684\u306b\u898b\u3066\u3044\u304f \u518d\u5e30\u7684\u306b\u30d5\u30a1\u30a4\u30eb\u3092\u898b\u308b\u306e\u306bpathlib.Path.glob()\u3092\u4f7f\u3044\u3001\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b\u306e\u306bshutil.copy()\u3092\u4f7f\u3046 \u4f8b\uff09C:\\sample\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3067\u3001\u30d5\u30a1\u30a4\u30eb\u540d\u306b\"a\"\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u3092\u30ab\u30ec\u30f3\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u30b3\u30d4\u30fc\u3059\u308b >>> from pathlib import Path >>> p = Path(r\"C:\\sample\") WindowsPath('C:/sample') >>> for f in p.glob(\"**/*a*): ... shutil.copy(f.absolute(), \"./\") \u2026","categories":["python","pathlib"],"provider_name":"Hatena Blog","blog_url":"https://tmg0525.hatenadiary.jp/","version":"1.0","blog_title":"TIL","author_url":"https://blog.hatena.ne.jp/tmg1998/","url":"https://tmg0525.hatenadiary.jp/entry/2018/11/08/100723","title":"\u6307\u5b9a\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b - Python","published":"2018-11-08 10:07:23","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftmg0525.hatenadiary.jp%2Fentry%2F2018%2F11%2F08%2F100723\" title=\"\u6307\u5b9a\u30d5\u30a9\u30eb\u30c0\u4ee5\u4e0b\u306e\u30d5\u30a1\u30a4\u30eb\u3092\u30b3\u30d4\u30fc\u3059\u308b - Python - TIL\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","type":"rich","image_url":null,"provider_url":"https://hatena.blog","author_name":"tmg1998"}