9 lines
250 B
Python
9 lines
250 B
Python
import os
|
|
|
|
directory = "/home/geezo/01_projects/decorrupt/motherload/scan"
|
|
contents = os.listdir(directory)
|
|
|
|
for item in contents:
|
|
if "lost" in item:
|
|
filepath = f"{directory}/{item}"
|
|
os.rename(filepath, filepath.replace(" ", "_")) |