回答編集履歴
2
最新のファイルを取得を追記
answer
CHANGED
@@ -8,6 +8,6 @@
|
|
8
8
|
Initial_path = r'リネームしたいファイルのパス'
|
9
9
|
|
10
10
|
print(Initial_path + "\")
|
11
|
-
filename = max([Initial_path + "\" + f for f in os.listdir(Initial_path)],key=os.path.getctime)
|
11
|
+
filename = max([Initial_path + "\" + f for f in os.listdir(Initial_path)],key=os.path.getctime) # 最新のファイルを取得
|
12
12
|
shutil.move(filename,os.path.join(Initial_path,r"rename.csv")) # rename.csvにリネーム後の名前を入れる
|
13
13
|
```
|
1
見出しを加えた
answer
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
### 自己解決できた方法
|
1
2
|
ダウンロード後に下記でファイル名を変えることで解決しました。
|
2
3
|
|
3
4
|
```python
|