Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Trim useless characters from filenames

Project Description

A script to trim a specific pattern from filenames.

Files are recursively checked for a pattern match on the path mentioned or in current working directory.

Usage

home $ ls songs
04_maroon5_she_will_be_loved.mp3        05 Flo Rida-Whistle.mp3
Nelly-Just A Dream 2010.mp3             David Archuleta - A Little Too Not Over You000.mp3


home $ trimfilename songs
parsing directory: songs
Files renamed:
songs/04_maroon5_she_will_be_loved.mp3    : maroon5_-_she_will_be_loved-tn.mp3
songs/05 Flo Rida-Whistle.mp3             : Flo Rida - Whistle.mp3

Successfully renamed 2 file/s


home $ ls thumbs
AlbumArt_Adele_Large.jpg  AlbumArt_hall_of_fame_Large.jpg  AlbumArt_lotavo_Large.jpg


home $ trimfilename thumbs -b AlbumArt_
parsing directory: thumbs
Files renamed:
thumbs/AlbumArt_Adele_Large.jpg        : Adele_Large.jpg
thumbs/AlbumArt_hall_of_fame_Large.jpg : hall_of_fame_Large.jpg
thumbs/AlbumArt_lotavo_Large.jpg       : lotavo_Large.jpg

Successfully renamed 3 file/s


home $ ls thumbs
Adele_Large.jpg  hall_of_fame_Large.jpg  lotavo_Large.jpg


home $ trimfilename thumbs -p _large -i
parsing directory: thumbs
Files renamed:
thumbs/lotavo_Large.jpg       : lotavo.jpg
thumbs/hall_of_fame_Large.jpg : hall_of_fame.jpg
thumbs/Adele_Large.jpg        : Adele.jpg

Successfully renamed 3 file/s
Release History

Release History

This version
History Node

0.7.3

History Node

0.7.2

History Node

0.7.1

History Node

0.6.0

History Node

0.5.1

History Node

0.5

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
trimfilename-0.7.3.tar.gz (4.2 kB) Copy SHA256 Checksum SHA256 Source Jun 18, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting