Skip to content

Commit 4be9235

Browse files
committed
fix:ix: file names
1 parent f0b1aec commit 4be9235

51 files changed

Lines changed: 21 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

prove/file.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import os
2+
3+
def rename_files():
4+
# Get all files in current directory
5+
files = os.listdir(".")
6+
7+
for filename in files:
8+
# Skip directories
9+
if not os.path.isfile(filename):
10+
continue
11+
12+
# Check if 'svolto' is in filename
13+
if "svolto" in filename:
14+
new_name = filename.replace("svolto", "soluzione-svolto")
15+
16+
# Rename file
17+
os.rename(filename, new_name)
18+
print(f"Renamed: {filename} -> {new_name}")
19+
20+
if __name__ == "__main__":
21+
rename_files()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)