Skip to content

A simple Python script that automatically renames files in a selected folder by replacing a given substring with another one. Useful for batch operations like replacing underscores with spaces.

Notifications You must be signed in to change notification settings

pawelp-codes/filename-replacer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Filename Replacer / Zmieniacz Nazw Plików

A simple Python tool that automatically renames files in a folder by replacing one substring with another.
Prosty skrypt w Pythonie, który automatycznie zmienia nazwy plików w folderze, zastępując wskazany fragment tekstu innym.

The script works directly in the folder where it is placed, ignores directories, and avoids renaming itself.
Skrypt działa w folderze, w którym się znajduje, pomija katalogi i nie zmienia własnej nazwy.

Usage / Użycie

  1. Place the script in the folder containing the files you want to rename.
    Umieść skrypt w folderze z plikami, które chcesz zmienić.

  2. Run the script.
    Uruchom skrypt.

  3. All filenames will be updated according to the replacement rule.
    Wszystkie nazwy plików zostaną zmienione zgodnie z zasadą zamiany.

Examples / Przykłady

  • Replace underscores with spaces
    Zamiana podkreśleń na spacje
    ("_", " ")

  • Replace spaces with dashes
    Zamiana spacji na myślniki
    (" ", "-")

  • Remove unwanted fragments
    Usuwanie niechcianych fragmentów
    ("_old", "")

  • Add suffixes or prefixes
    Dodawanie sufiksów lub prefiksów
    (".jpg", "_edited.jpg")

About

A simple Python script that automatically renames files in a selected folder by replacing a given substring with another one. Useful for batch operations like replacing underscores with spaces.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages