回答編集履歴
1
Python追記
test
CHANGED
@@ -21,3 +21,31 @@
|
|
21
21
|
end
|
22
22
|
|
23
23
|
```
|
24
|
+
|
25
|
+
---
|
26
|
+
|
27
|
+
Pythonでも行けました。
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
```Python
|
32
|
+
|
33
|
+
import re
|
34
|
+
|
35
|
+
import glob
|
36
|
+
|
37
|
+
import shutil
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
files = glob.glob("./TEXT*/*/*.txt")
|
42
|
+
|
43
|
+
for f in files:
|
44
|
+
|
45
|
+
m = re.match(r"./TEXT.*?/(.*?)/(.*).txt", f)
|
46
|
+
|
47
|
+
after = "./NEW_TEXT/{0}{1}.txt".format(m.group(1), m.group(2))
|
48
|
+
|
49
|
+
shutil.copy(f, after)
|
50
|
+
|
51
|
+
```
|