Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
Tags
- JSON
- ubuntu
- paramiko
- nvidia-smi
- label
- windows forms
- Docker
- SSH
- OpenCV
- error
- pytorch
- 기타 연주
- C++
- 프로그래머스
- Selenium
- pip
- 채보
- C#
- VS Code
- C
- Numpy
- 컨테이너
- Visual Studio
- 핑거스타일
- YOLO
- Python
- mysql
- 오류
- Linux
- pandas
Archives
- Today
- Total
기계는 거짓말하지 않는다
Python 파일 이름 변경 본문
import os
dir_path = "test/files"
file_names = os.listdir(dir_path)
for name in file_names:
src = os.path.join(dir_path, name)
dst = name.replace("old_char", "new_char")
dst = os.path.join(dir_path, dst)
os.rename(src, dst)
'Python' 카테고리의 다른 글
Python String에 여러 요소가 있는지 판별 (0) | 2021.08.28 |
---|---|
Python argparse module (0) | 2021.08.28 |
Python Numpy any Filter (0) | 2021.08.15 |
Python OpenCV, PIL Image shape, size (0) | 2021.08.10 |
Python PermissionError: [Errno 13] Permission denied (0) | 2021.08.05 |
Comments