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.

15 lines
354 B
Python

#!/bin/env python
# -*- coding: utf-8 -*-
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("\fN e g a s p h ä r e"):
newpath = os.path.join("negasphäre", filename)
os.rename(oldpath, newpath)