Skip to content
This repository was archived by the owner on Aug 15, 2024. It is now read-only.

Commit e062e28

Browse files
chore: bumped php version to 8.x
1 parent 9713397 commit e062e28

File tree

743 files changed

+26
-2
lines changed

Some content is hidden

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

743 files changed

+26
-2
lines changed

README.md

+1-1
File renamed without changes.
File renamed without changes.

rename-files.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
import os
2+
3+
def rename_files(directory):
4+
# Iterate over all files and directories in the current directory
5+
for root, dirs, files in os.walk(directory):
6+
for filename in files:
7+
# Check if the file ends with "8.x" and has a .py extension
8+
if filename.endswith("7.x.php"):
9+
# Construct the old and new file paths
10+
old_filepath = os.path.join(root, filename)
11+
new_filename = filename.replace("7.x", "8.x")
12+
new_filepath = os.path.join(root, new_filename)
13+
14+
# Rename the file
15+
os.rename(old_filepath, new_filepath)
16+
print(f"Renamed {old_filepath} to {new_filepath}")
17+
18+
# Recursively call rename_files for subdirectories
19+
for subdir in dirs:
20+
rename_files(os.path.join(root, subdir))
21+
22+
if __name__ == "__main__":
23+
# Start renaming from the current directory
24+
rename_files(os.getcwd())

0 commit comments

Comments
 (0)