filename2sfv: Create SFV files from filename-embedded checksums

Initially published on 2009-03-14.

This script will read checksums embedded in the filenames of files in the current directory, and will create an SFV file, suitable for checking by cfv, WinSFV and other similar tools.

The script should work on any GNU/Linux system, and probably on other *nixes. It is written in PHP, so make sure you have PHP (for Debian, the package named php5-cli) installed.

Example

$ ls
[Mazui]_Black★Rock_Shooter_OVA_[2022D8AE].mkv
 
$ filename2sfv
1 checksum(s) written to filename2sfv.sfv.

The file filename2sfv.sfv will contain:

; Generated by filename2sfv v.2013-10-08 <https://romanrm.net/filename2sfv>
;           at 2013-10-08 21:27:39 UTC
;
[Mazui]_Black★Rock_Shooter_OVA_[2022D8AE].mkv 2022d8ae

Download

Save the file as filename2sfv, then set it as executable (chmod +x filename2sfv).

For convenience, you may copy or symlink the script to a dir which is in the system PATH, e.g. /usr/local/bin/.


filename2sfv.txt · Last modified: 2015-06-07 18:20 UTC by rm