Timeline for Renaming all files/folders in first children folders but not sub-children
Current License: CC BY-SA 4.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Dec 28, 2018 at 22:17 | comment | added | Reinderien | Looks OK now :) | |
Dec 28, 2018 at 16:13 | history | edited | Aries_is_there | CC BY-SA 4.0 |
fix error
|
Dec 28, 2018 at 15:48 | history | edited | Aries_is_there | CC BY-SA 4.0 |
Store replace pattern in list
|
Dec 28, 2018 at 15:31 | comment | added | Aries_is_there | you are correct for "sub must only be applied on the filename without path", I took a mistake on it, and "There's no point to passing the count and flags kwargs to re.sub in this case. " I just showing the function, and thanks for " Use re.compile and call sub on the compiled regex object.", updating my comment | |
Dec 28, 2018 at 15:21 | comment | added | Reinderien |
Finally: you're applying rename and sub on the same filename, which is incorrect. sub must only be applied on the filename without path, and rename must have the path.
|
|
Dec 28, 2018 at 15:20 | comment | added | Reinderien |
Also, don't use the re.sub form at all. Use re.compile and call sub on the compiled regex object.
|
|
Dec 28, 2018 at 15:19 | comment | added | Reinderien |
There's no point to passing the count and flags kwargs to re.sub in this case.
|
|
Dec 28, 2018 at 15:13 | history | answered | Aries_is_there | CC BY-SA 4.0 |