Skip to content

Instantly share code, notes, and snippets.

@rabbleNaut
Created March 20, 2014 12:38
Show Gist options
  • Save rabbleNaut/9662879 to your computer and use it in GitHub Desktop.
Save rabbleNaut/9662879 to your computer and use it in GitHub Desktop.
Simple 1-liner that renames all texts files in a folder ending with ".sf1" to ".txt"
import os
# This will rename all files ending with ".sf1" to ".txt"
[os.rename(f, f.replace('.sf1', '.txt')) for f in os.listdir('') if f.endswith('.sf1')]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment