FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
Python/ModifyFilename.py at master · javaTyrant/Python · GitHub
javaTyrant
Python
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
Python
/
ModifyFilename.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
11 lines (11 loc) · 348 Bytes
Breadcrumbs
Python
/
ModifyFilename.py
Copy path
File metadata and controls
11 lines (11 loc) · 348 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
import
os
dir
=
os
.
getcwd
()
subdir
=
os
.
listdir
(
dir
)
for
i
in
subdir
:
path
=
os
.
path
.
join
(
dir
,
i
)
if
os
.
path
.
isdir
(
path
):
end_dir
=
os
.
listdir
(
path
)
for
i
in
range
(
len
(
end_dir
)):
newname
=
end_dir
[
i
][
0
:
50
]
os
.
rename
(
os
.
path
.
join
(
path
,
end_dir
[
i
]),
os
.
path
.
join
(
path
,
newname
))
Back
|
FazBrowse Home
|
New Git URL