You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

14 lines
322 B
Python

#!/bin/env python
import os
for root, dirs, files in os.walk('txt'):
for filename in files:
oldpath = os.path.join(root, filename)
f = open(oldpath)
firstline = f.readline()
f.close()
if firstline.startswith("\fCentauri-Zyklus"):
newpath = os.path.join("centauri", filename)
os.rename(oldpath, newpath)