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?

【Python】osモジュールの関数

Posted at

現在のディレクトリをpathに設定するのはchdir(path)です。
getcwd()は、現在の作業ディレクトリを返します。

listdir(path='.')はディレクトリだけではなくファイルも返します。

remove(path)はファイルを削除します。
ディレクトリを削除する場合はremovedirs(name)を使用します。

rename(src, dst)は、ファイルまたはディレクトリの名前をsrcからdstに変更します。

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?