| pure-sfv |
|
|
| [About] | [Options and Usage examples] | [Download] | [Links] |
The basic usage and understanding is quite simple.
But there are more options to make whatever you may ever need based on checksum.
Options Usage examples Exit values
Usage: pure-sfv [mode] [options] [-s sfv-filename] [-f filename(s)]
Mode Meaning
--------- -------
-t Test SFV file(s), DEFAULT
-c Create SFV file
-y Count files
Options Meaning
--------- -------
-s sfv-filename .sfv file to verify or create (*m)
-f filename File to verify or add to sfv (*m)
-d Change to sfv or file location directory for processing
-D path Change to directory for processing
-I mask Include files, Wildcard allowed (*m)
-E mask Exclude files, Wildcard allowed (*m) order important
-q Quiet, only prints error messages
-v Verbose, by default this option is on
-W For windows users, pause before exit
Create mode specific options
-w Off Win-SFV emulation to create SFV
-R (recursive) enter all dirs starting from curent and create SFV and PARs
if one dos not exists
if -s is not specified sfv file name would be created
-RR Previous, but create SFV even when one exists
-p percent Create PAR files for each SFV, Where recovery ratio in %
-N char Placeholder for auto created name, Deafilt 'X'
Test mode specific options
-R Recurse all dirs from curent and test SFV if exists
-i Ignore case on filenames
-x Ignore Directory names in SFV file
-X Ignore SFV file if no files from it found
(*m) this options could be included multiple times
-h This help
TODO
Not implemented yet:
-u Do not tests alredy tested file, update tested files database,
only test if file has been changed
-U db_filename Enable -u and specify tested files database,
Defaults to sfv-filename_pure-sfv.tmp
Flag files and renaming support options
Flag Files to create, %%S %%F %%D %%B %%M would be replaced
-G @,NAME If all tested are good.
-g @,NAME For each tested good files.
-B @,NAME If some files are bad.
-g @,NAME For each bad file.
-M @,NAME If some files are missing.
-m @,NAME For each missing file.
-S @,NAME For each similar file in database duplicate
@ action could be:
f - create flag file Name
n - rename to Name
s - execute Name with file name as first argument
Example: pure-sfv -m f,%%F_is_missing -G f,%%S_ALL_FILES_OK.txt -M f,_list_of_missing_files.txt
%%S %%F %%D %%B %%M would be replaced
%%S sfv name
%%F file name
%%d directory
%%D directory full path
%%T Time mm_dd_hh24_ss
Options Description
Options -s -f -I could be omitted.
First non option value could be filename to test or sfv-filename
If it has extension .sfv than it considered sfv (ignore case)
#pure-sfv filename.sfv == pure-sfv -s filename.sfv
#pure-sfv filename.any == pure-sfv -f filename.any
In test mode -s could be included multiple time so only this checksum files would be tested.
Wildcards for -s are supported.
Wildcards -E and -I could be included multiple times.
Only * and ? supported, no reg exp!
Filenames specified in command line and compared with wildcards.
Spcified in command line order of -E -I would be the comparison order.
Than if -I not specified defults to ignore all other files.
-i "Ignore case" would affect pattern matching. By default *.sfv will not match my.Sfv
shortcuts: if file name has Wildcard characters it would considered as -I (include)
#pure-sfv "*.txt" == pure-sfv -I "*.txt"
#pure-sfv -I "*.txt" "*.any" == pure-sfv -I "*.txt" -I "*.any"
-d would take a first specified file paths directory as base directory (-D)
all consecutive files specified would be striped of this path.
Options Usage examples Exit values
Examples basic:
Test file(s)
#pure-sfv file_to_test.sfv or pure-sfv -s file_to_test.sfv
#pure-sfv file_to_test.sfv data1 or pure-sfv -s file_to_test.sfv -f data1
#pure-sfv "*.mp3" or pure-sfv -I "*.mp3"
#pure-sfv -s "*.Sfv"
Create checksum file
#pure-sfv -c file.sfv "*.mp3" or pure-sfv -c -s file.sfv -I "*.mp3"
Create checksum files in all sub dirs
#pure-sfv -c -R "*.mp3"
#pure-sfv -c -s my.sfv -R "*.mp3"
Recreate create checksum and RAR (without recovery set) files in all sub dirs
#pure-sfv -c -RR -p 0 "*.mp3"
Examples details:
Test SFV file:
# pure-sfv file_to_test.sfv
--( Verifying file: file_to_test.sfv )----------------------
data1 OK
data2 OK
------------------------------------------------------------
Everything OK.
Tested 2 files, Successful 2, Different 0, Missing 0
Find and test SFV file in directory:
# pure-sfv
--( Verifying file: file_to_test.sfv )----------------------
data1 OK
data2 OK
------------------------------------------------------------
Everything OK.
Tested 2 files, Successful 2, Different 0, Missing 0
--( Verifying file: file_to_test2.sfv )----------------------
data3 different CRC
data4 No such file
------------------------------------------------------------
Errors Occured.
Tested 2 files, Successful 0, Different 1, Missing 1
--Totals--
Tested 2 SFV files
Tested 4 files
Ignored 0 files
Successful 2 files
Different 1 files
Missing 1 files
Test SFV file and include in tests only specific file(s):
# pure-sfv -t -s file_to_test.sfv -f data1
or
# pure-sfv file_to_test.sfv data1
--( Verifying file: file_to_test.sfv )----------------------
data1 OK
data2 Not tested
------------------------------------------------------------
Everything OK.
Tested 1 of 2 files, Successful 1, Different 0, Missing 0
Test SFV file and include in tests only specific files using mask (* and ?):
# pure-sfv -t -s file_to_test3.sfv -I *.mp3
--( Verifying file: file_to_test3.sfv )----------------------
song1.mp3 OK
song2.mp3 OK
songsinfo.txt Not tested
------------------------------------------------------------
Everything OK.
Tested 2 of 3 files, Successful 2, Different 0, Missing 0
Find SFV in curent directory for the file and test this file.
# pure-sfv data1
Change to file location directory for processing and do the job there.
# pure-sfv -d -f /home/sfv/test/data1
# pure-sfv -d /home/sfv/test/data1
or
# pure-sfv -D /home/sfv/test/ -f data1
Do the job in all sub directories starting from current or specified
# pure-sfv -D /home/sfv/test -R
Creating SFV files
#pure-sfv -c -s test1.sfv
or
#pure-sfv -c -I song1.mp3 -E *.mp3 test1.sfv
or
#pure-sfv -c test1.sfv song1.mp3 data1 data2
----( Creating: test1.sfv )--------
Adding: data1
Adding: data2
Adding: song1.mp3
SFV file successfully created (3 files processed) ...
Automatic checksum file naming ability in create mode
File name would be created based common name for file or on directory name
if file names have nothing in common.
# pure-sfv -c -D /home/sfv/test1
----( Creating: experiment 1 result_data.sfv )--------
Adding: 01experiment 1 result_data1-2.dat
Adding: 02experiment 1 result_data2-2.waw
Adding: experiment description.txt
SFV file successfully created (3 files processed) ...
# pure-sfv -c -D /home/sfv/test2
----( Creating: test2.sfv )--------
Adding: data1
Adding: support_info
SFV file successfully created (2 files processed) ...
Details by examples on automatic file naming
This is example listing 1:
SR01-95 - Saturn's Race - Larry Niven & Steven Barnes.mp3
SR02-95 - Saturn's Race - Larry Niven & Steven Barnes.mp3
....
SR95-95 - Saturn's Race - Larry Niven & Steven Barnes.mp3
#pure-sfv -c -N Z -p 14 *.mp3
SFV name would be:
SRZZ-95 - Saturn's Race - Larry Niven & Steven Barnes.sfv
PAR names would be:
SRZZ-95 - Saturn's Race - Larry Niven & Steven Barnes.par
SRZZ-95 - Saturn's Race - Larry Niven & Steven Barnes.p01
....
SRZZ-95 - Saturn's Race - Larry Niven & Steven Barnes.p13
This is example listing 2:
Saturn's Race - Larry Niven & Steven Barnes 001 of 395.mp3
Saturn's Race - Larry Niven & Steven Barnes 002 of 395.mp3
....
Saturn's Race - Larry Niven & Steven Barnes 395 of 395.mp3
#pure-sfv -c -N Z -p 10 *.mp3
SFV name would be:
Saturn's Race - Larry Niven & Steven Barnes.sfv
PAR names would be:
Saturn's Race - Larry Niven & Steven Barnes_001-197.par
Saturn's Race - Larry Niven & Steven Barnes_198-395.par
Saturn's Race - Larry Niven & Steven Barnes_001-197.p01
....
Saturn's Race - Larry Niven & Steven Barnes_001-197.p18
Saturn's Race - Larry Niven & Steven Barnes_198-395.p01
....
Saturn's Race - Larry Niven & Steven Barnes_198-395.p18
Create checksum file in all sub directories starting from current or specified
Make seperate chksum files for each dir.
Create will not create SFV file if any alredy exists in directory.
# pure-sfv -c -D /home/sfv/test -R
Do not create sfv my_new.sfv in each directory where par or bad*.flag file exists.
#pure-sfv -c -s my_new.sfv -s "*.par" -s "bad_*.flag" -R "*.mp3"
Options Usage examples Exit values
EXIT_NO_PROBLEMS = 0
ERROR_FILE_ACCESS = 1
ERROR_DIR_ACCESS = 2
ERROR_FILE_FORMAT = 3
ERROR_MEMORY = 4
ERROR_CREATING_PAR = 5
/* File from command line has not been found */
EXIT_FILE_NOT_FOUND = 8
Exit codes for test mode
SFV file has not been found to verify at least one of specified files
EXIT_SFV_NOT_FOUND = 9
Tere are at least one file with different CRC and at least one missing file
EXIT_TESTED_DIFFERENT_MISSING = 10
Tere are at least one file with different CRC no missing files
EXIT_TESTED_DIFFERENT = 11
Tested file have the same SRC as expected but in there are at least one missing file
EXIT_TESTED_OK_MISSING = 12
Files tested ok and its CRC has been found in database
EXIT_TESTED_OK_DUPLICATE = 20
File has not been tested nor SFV found, But it's CRC has been found in database
EXIT_DUPLICATE = 21
Options Usage examples Exit values