unnamed files

September 9, 2010

[Warning: This post is a backup recovery from my previous Wordpress blog. All content was automatically converted accessing a MySQL database using a Python script (details). Mostly are in Portuguese but if you are interest I can translate to English. If you found any problem dont’t hesitate to contact me in comments.]

I'm a heavy user ofcommand line interface and often named files without extension. This behavior forces me to usefile utility every time I have doubts.

$ file stick-note1
stick-note1: ASCII text

When organizing myhome/ I came across with many files like that, so I decided make this script to walk throughout files and check if it's text file without extension and put .txt after.

download script

$ python names.py This only change the file on current directory and it's a "works for me" approach. Adapt to your needs.