Skip to content

Amithtraj/bulk_rename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Description:

This Python script provides a utility for batch-renaming files within a specified folder. It takes two parameters: the folder path containing the files to be renamed, and a string pattern to be removed from the existing file names. The script checks if the specified folder path exists and, if so, iterates through the files, identifying regular files (not directories) and renaming them accordingly. The new names are constructed by removing the specified pattern, and the original files are replaced with the renamed versions. The script then prints out the details of each renaming operation. Example Usage:

Define folder path and pattern to remove

folder_path = r"C:\Users\USER\Desktop\Spotify"
remove_part = 'unwated texts'

Call the function to rename files

rename_files(folder_path, remove_part)

Note: Ensure to provide the correct folder path and pattern for successful execution.

About

Rename all files in a folder.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages