0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

2つのパスの指定方法

Last updated at Posted at 2025-03-26

環境

VSCode
バージョン: 1.98.2
コミット: ddc367ed5c8936efe395cffeec279b04ffd7db78
日付: 2025-03-12T13:32:45.399Z
Electron: 34.2.0
ElectronBuildId: 11161602
Chromium: 132.0.6834.196
Node.js: 20.18.2
V8: 13.2.152.36-electron.0
OS: Darwin arm64 24.3.0

Python 3.10.16

Pythonでローカルファイルのパスを取得する

①特定のフォルダ直下のすべてのファイルパスを取得する

img_names = Path(DATA_DIR + "train/").glob("*.png")

①特定のファイルパスを取得する

# ベタ書でももちろんok
img_name = f'{DATA_DIR}train/{image_id}.png'
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?