modified fileconv bin

This commit is contained in:
Joel Mathew Thomas
2024-07-23 00:19:30 +05:30
parent 0d051abb41
commit 2eaacd4968
+8 -2
View File
@@ -23,6 +23,12 @@ def rename_folders_and_files(directory):
os.rename(old_path, new_path) os.rename(old_path, new_path)
if __name__ == "__main__": if __name__ == "__main__":
root_directory = input("Enter the root directory path: ") root_directory = os.getcwd()
rename_folders_and_files(root_directory) confirmation = input(f"Are you sure you want to rename all files and folders in '{root_directory}'? (yes/no): ")
if confirmation.lower() == 'yes':
rename_folders_and_files(root_directory)
print("Renaming completed.")
else:
print("Operation canceled.")