

---------------------------------------------------------------
Scansort HOWTO 1.4 written by Gianluca (Giallu on IRC - DALnet)
Based upon the features of Scansort v1.7
---------------------------------------------------------------


This is a mini-guide through the first steps necessary to set up and working 
this GREAT program and it is based on the most common questions I answered to 
other users but, before all, I'll answer this:


WHAT THE HELL IS SCANSORT?

Well, I can define scansort as a command line program that does ALL the tasks 
that you normally have to do by hand when collecting scans.
It reads all the CSVs you specify in the config-file and sorts the files you 
downloaded off the net in the right dirs, even if they are renamed (in fact it 
relies on a table of length and crc values to recognize a file), eventually 
creating a dir for the files if it isn't already there (I'll discuss later how 
scansort choose the name for the dir). This is indeed the most attractive 
feature (at least for me): you supply only the list of CSVs, then Scansort 
recognize automatically the collection to which each file belongs.
Then it creates a report (which has a wide configurable format) for each active 
(i.e. with at least 1 pic) collection and optionally creates a summary report 
for all the collections.


WHY SHOULD I USE OLD SH**TY COMMAND PROMPT INSTEAD OF THOSE NICE GUI PROGRAMS?

Actually..... you don't! I use scansort because of its great power in a 100K or 
so program; I understand that tuning up the cfg file (or files) to suit your 
needs may be somehow a tricky task but once you've done it, IT IS UNBEATABLE. 
Try with ANY other program to sort out 100 Mb of downloads from AMP and generate 
the reports. I'm ready to challenge you armed only with scansort and a cfg file; 
let's see who will do this faster!!! Anyway you're old enough to take your own 
decisions so it's only up to YOU using it or not ;-).
And, before you ask: NO, the author is not going to add a GUI to it! That will 
be another program, not scansort anymore.


OK, I'LL GIVE IT A TRY. WHERE SHOULD I BEGIN FROM?

At first, we will discuss how to start using scansort. You have to sort out your 
current collection even if you checked it with another program. Ok, I know, 
youre wondering why you should do this: the answer is simple. Scansort checks 
for the image integrity only when it sort (and recognize) the files so you have 
to resort your collection to be sure the pics matches your current csvs.
So the first thing you should do is writing (or, better, modifying) a config-
file. Here it is the (simplest) one you can use:

# Scansort 1.7 config file
# for explanation of the various switches see scansort17.txt
-rmiesboE -u -B -T

# Path for CSV files
-dcc:\scansort\csv
# Path of your collection
-dpD:\scan
# Path for reports
-drc:\scansort\missing
#path for Wastebasket
-dwd:\dupes
#Use the following collections
*


As you can see I put scansort in c:\scansort. The first option sets the path of 
the csv files using the -dc switch: I use c:\scansort\csv.
Then you must choose where all sorted pics should go: this is done by the -dp 
switch. I use d:\scan so the line -dpd:\scan.
The same system is used to define the path of reports using the -dr switch. As 
you see, I used c:\scansort\missing.
Then for the wastebasket. This is a recent feature added for security reasons. 
In fact it could happen that you have a bad csv and sorting your downloads using 
it may result in loss of (precious) pics.
So instead deleting scansort simply move the bad file to that dir. Of course you 
have to manually delete that dir from time to time....
The last thing you have to set is WHICH collections from the directory you 
supplied are to be used. For the first attempt you can simply write * there so 
ALL found csv will be read and used.
Please note that this config file we just wrote is not what I (and the scansort 
author) should call "a good config". If you write * as the collections you can't 
use many options available for spanning collections and recognize new csv files.
So I suggest doing this: run Scansort with the command

     scansort cfg

then open the file scansort.log located in the current dir; you'll notice that 
there's a section like this

If you want to get rid of the Wildcards just copy the following to your config 
file:

451
451x
777_Wallpapers
777_Wallpapers_Index
A-Scan98_AW
A-Scan98_NP
Abadyn_SCP
Admiral_Krag
etc.

Now do what suggested. Copy this lines in the config file thus removing the * 
and you'll have a good config file to work with.


NOW I HAVE A CFG FILE. WHAT I'M SUPPOSED TO DO NOW?

Well, now the only thing left to do is launching scansort from the command line 
and watching it moving your pics to the right dirs.
As said before, the first time you should sort all your collections. Just rename 
the folder containing all your collections to something like "tosort" then issue 
the command:

scansort -m cfg c:\tosort

I run scansort only from it's own folder (i.e. c:\scansort) but it should work 
fine even if launched from a directory in you path; in this example I assume 
that the config file is named cfg and you have the files to be sorted in 
c:\tosort. Please change that to match your current configuration.
Please note that scansort looks even in all subfolders of tosort for pics so 
there is no need to put all your files in one dir before launching it.
You will end up with d:\scan containing all the good pics you have and 
c:\scansort\missing with all the reports for missing files. There will be even a 
file summary.txt with a report of the status of all active collections.
You will be using this command fairly often if you download all new pics in 
c:\tosort. Please note that the -m option actually moves the files from tosort 
to d:\scan. If you want to copy them instead of moving just remove -m from the 
command line.


YES. THIS IS FAIRLY CLEAR. BUT WHAT ALL THOSE OPTIONS DO?

I see, there is a line of the config-file I didn't explain. It was the one with 
all the report and general options:

-rmiesboE -u -B -T

Let's see what every of that means:
with the -r switch you define HOW your reports will look like. In this case I 
used:
     m so the report will have 'm'issing files
     i so the report will have 'i'incorrect files
     e so the report will have 'e'xtra files
     s so the report will have a 's'ummary in it
     b so the report will be 'b'rief (i.e. no descriptions of files)
     o a file named summary.txt will be written in report directory
     E do not write reports for completed collections

the -u switch is there because by default filenames with 8 or less characters 
are converted to UPPERCASE. I want to follow the case in csv so the -u option.
the -B switch tells scansort to leave bad files where they are. Bad files are 
files with a valid name but wrong size or crc.
-T the last option I use. That is to set the date of the file to NOW. I use it 
to keep track of when I added pics to collections.
Please note that there are many options you may use to fit your needs: in the 
last paragraph of this file I show all the switch but you should really look at 
the help file to know them all.


HOW DO I DEAL WITH CSV UPDATES?

In version 1.7 the CSV format changed so you now only have to write the name of 
the collection as you want it: this name will be used for directory, report and 
CSV name. Then Scansort looks in the csv dir for one or more CSVs matching that 
name and use the one with the higher number of scans in it (the number is the 
one on the CSV name, not the actual number of entries in it). The nice thing 
about this new version is the way it searches for this matching CSVs. For 
example if a line in the config reads:

Light&Magic_HQ

all the following CSVs are recognized as belonging to this collection:

MTCM_Light&Magic_HQ_20.csv
Light-&-Magic-HQ_21.csv
Light_&_Magic_HQ_24.csv
McBluna_light&magichq_28.csv

And the last will be used since has 28 scans in it.
You got it? now Scansort removes, along with the prefixes, all the spacing 
characters in the filenames so all those will be fine. But there's even more. 
You may want to use a collection name like this:

Echoscan_Felines

while all the CSV updates you get are named Felines or Felines_by_Echoscan.
Well, now you can do something like this

Echoscan_Felines Felines Felines_by_Echoscan

the collection now will be updated even by Felines_xxx.csv and/or 
Felinesbyechoscan_xxx.csv.

Then, whenever you want to get rid of old CSV files just add -K to the command 
line and scansort will delete (move to wastebasket actually) old files.

     Scansort -m -K cfg c:\tosort        that is..........

please note that scansort recognize MTCM and McBluna as legal prefixes but you 
can add your own with the new -P/-p option. I have a line like this in config:

-PHI -PFoyle -PMTCM -PMcBluna

so not only Foyle and HI will be recognized as prefixes but the will even be 
removed (if using -p they are left there) from the filename.


THAT'S FINE.... IF ONLY I COULD TAKE CARE OF MY 10 CDs, 50 ZIPs, 3 JAZ ETC....

This is going to be a much more sophisticated setup but you can even take care 
of spanned collections; The key is learn dealing with "havelists". This is 
something like a CSV file (actually, in version 1.63 and above, there is a new 
binary havelist format which is much smaller and therefore faster to load) that 
lists all the scans in the collection dir. This is done using the -rH option (or 
-rHb for the binary format) on the command line. You have to create an havelist 
for every disk in your collection then import all of them while checking the new 
files. This is done using the -h switch in the config file. You can add multiple 
entry in the config file like:

-hcd1.bin
-hcd2.bin
-hcd3.bin

Please pay attention that by default the havelist is named have.txt (or 
have.bin) so you have to manually change its name before creating the 2nd.


THIS IS FINE FOR ARCHIVED COLLECTION. WHAT ABOUT IF MY ONGOING ARE SPANNED ON 2 
HDs?

Scansort v1.7 introduced some new VERY useful features for doing this job. now 
you can specify a new collection path for a group of collections so there's no 
need to write the full path of every collection on his line.
Here's a sample of my current config file:


-dpd:\scan\Cyberclub
CC_30_From_the_Heart
CC_30th_anniversary_Pms
CC_9807_Pbissue
CC_Alley_Baggett
CC_A_Long_Look
CC_American_beauty
CC_Animal_Instincts
CC_Arcade_Aphrodites

-dpd:\scan
451
451x
777_Wallpapers
777_Wallpapers_Index
Abadyn_SCP
Admiral_Krag
AlohaCaps_SDC
Alone2Edit_TTSR  TTSR_AL2
Anzacs
ar'Ondite
ar'Ondite_Comics
ar'Ondite_Fantasy
A-Scan98_NP
A-Scan98_AW
Asmodeus
AVScans
BabeTV_SWA
BadgerScan

-dpd:\scan\misc
* -r

As you can see I already grouped my collections in Cyberclub, Regular & all the 
rest. You can still change the path for one collection using -ppath near the 
collection name but with my way I didn't feel this need. I only use -r on misc 
to avoid report generation for those not so interesting collections.


BUT, HOW ARE YOU ARRANGED WITH YOUR COLLECTION?

Since I'd like to sort scans as fast as possible I use two config files, one for 
the ongoing and one for the finished collections. The first is used to sort the 
new downloads in the collections subdirectories while when I run the second it 
deletes (moves to dupes dir) all the files belonging to already completed 
collections. This is the two files:

cfg1
# Scansort 1.7 config file

-rmiesbofE -u -b -E -T -rr

# Prefixes
-PHI -PFoyle -PMTCM -PMcBluna

# Path for CSV files
-dcc:\scansort\csv

# Path for reports
-drc:\scansort\missing               

# Path for wastebasket
-dwd:\dupes

# Have file for Krags already burned
-hCD09.bin

# Cyberclub
-dpd:\scan\Cyberclub
CC_30_From_the_Heart
CC_30th_anniversary_Pms
CC_9807_Pbissue
CC_Alley_Baggett
CC_A_Long_Look
CC_American_beauty
CC_Animal_Instincts
CC_Arcade_Aphrodites
CC_Barbi_Benton
CC_Big_Centerfold_Index_by_azASAP
CC_BigCenterfold_Renamed
CC_Black_&_White
CC_Bunny_Birthday
CC_Carnival
CC_Chameleon_Anita_Russell
CC_Chat_Girl
CC_City_Girls
CC_Close_Encounter
CC_Countess_Vera_Gottlieb
CC_Datasheets_Renamed
CC_Different_kind_of_Crosby
CC_Dirty_Girls
CC_Donovan_at_Ease
CC_Fillies_of_Crazy_Horse
CC_Forever_in_BlueJeans
CC_Girl_on_a_Dolphin
CC_Girls_of_Japan
CC_Girls_of_Ma_Bell
CC_Girls_of_Pack10_II
CC_Girls_of_the_Adriatic
CC_Girls_of_the_big_eight
CC_Greeneyed_Women
CC_GreenEyed_Women_Index
CC_H2Oh
CC_If_the_shoe_Fits
CC_L-Cover_Index_by_azASAP
CC_L-Cover_Renamed
CC_Leather_or_Not
CC_Lens_of_Love
CC_L-Head_Index_by_azASAP
CC_L-Head_Renamed
CC_Lisa_Boyle
CC_L-Port_Index_by_azASAP
CC_L-Port_Renamed
CC_Knock_Outs
CC_Misc_Pics
CC_Music_Girls
CC_My_Sister_Myself
CC_Naked_Cheerleader
CC_Night_Calls
CC_Noir
CC_Picture_of_the_Day
CC_Playing_Around
CC_Playmate_2000_Candidates
CC_Playmate_Houseparty
CC_Playmate_of_Year
CC_Playmate_Personal_Pages
CC_Playmate_Revisited
CC_PmReview
CC_Prize_Pulitzer
CC_Pucker_Up
CC_Radiovisions
CC_Riverboat_Gambolers
CC_SeX_in_the_great_outdoors
CC_Sisters
CC_Sleepy_Time
CC_Stalking_the_Wild_Veruschka
CC_Sugar&Spice
CC_Sultry
CC_Sung_Hi_Lee
CC_Sun_Sand_Skin
CC_Swedish_Bikini_Team
CC_T_is_for_Taylor
CC_Take_it_off
CC_Tattoo_Who
CC_Themes_Index_by_azASAP
CC_Tune_it_in_Tune_it_up
CC_Tying_one_On
CC_Victoria_Silvstedt
CC_WaterWorks
CC_Women_in_a_Mans_World
CC_Women_of_Iceland
CC_Women_of_Internet
CC_Women_of_Washington
CC_Womens_Work

# Regular
-dpd:\scan
451
451x
777_Wallpapers
777_Wallpapers_Index
Abadyn_SCP
Admiral_Krag
AlohaCaps_SDC
Alone2Edit_TTSR  TTSR_AL2
Anzacs
ar'Ondite
ar'Ondite_Comics
ar'Ondite_Fantasy
A-Scan98_NP
A-Scan98_AW
Asmodeus
AVScans
BabeTV_SWA
BadgerScan
BaRReL_SnF
Bart98
Bartscan98_Index
Ben98
Bishopscan_NS
Bishopscan_NS_Index
blackMagic2
bmac99
Boatfan_50Sexy
Boatfan_BBoobs
Boatfan_BBuns
Boatfan_BBuns98
Boatfan_HOF
Boatfan_TChest
Boatfan_TVStars
Boatfan_WWW
BorgScan98_Index
Briseis98
Bulldog98
Candy_Classics
Catscan
CelebMaster_Collages
Celebmaster_SE_CiArtists
Colibri_SWA
Colibri_XTRA
Coolspy
Coscair_Gold
Czar
Data_Girls
Dawg98
Dawg98_X
Dawgdaze
Dawgdaze_Index_by_azASAP
DawnScan
Deltascan_Nudes
DempseyScan
DiamondScan_Extra
Diggers_Painted_Ladies
DigitFlip
DigitFlip_SCP
Djax-p-Scans
DjaX-rh-m-Scans
EagleScans98
Echoscan_Felines
EndZeit
Enigmatist_SWA
Euro_New
EuroSCP
EuroSCP_index
Fatekiller_All
Fender
Fender_SCP
Firestarter
First_Aid_Scan
Fragola_B&W
FragolaSCP
FrostieScan
Gedede
Goose510_CiArtists
Goose510_Scans
Goose510_SI98
Gorek_Index
Gorek_Swa-II
Grim98
HammerHead
Harli_SWA
Harli_SWA_Index
Heidiland
HiddenX
HitmanInc
HitmanInc_Ex
Hugescan
Hugo_CiArtists
Iznoscans
JenzScans_S3
JogiScan98
JscAN98_X
JscAN_SNF
JscAN_Pets_Covers
Kandor_SWA
KhamScan_odb
Kham_SCP_A
Kham_SCP_W
K-Town98
K-Town98_Index
K-TownSCP
Kullscans
KullScans_XX
Kull's_Natural_Beauties
Lakota
Light&Magic_Comics
Maelstroms_Eye
Maelstroms_Eye_VidCaps
Maelstroms_Eye_XXX
MrPaul
MrPink
Music_Boy
Nala
Nighthawk
Nightwing_Comix
Nightwing_Comix_Index
NurgleScans
NWarScans
Oaf_SWA
OKScans_Best_Italian
Oracle_SWA
Palantir98_Fantasy_index
Palantir98_Wallpaper
Palantir_JBHC
Paradise_SDC
Paradise_SDC_Index
Pegasus
PePeScan_Extra
PePeScan_Fantasy
PePeScan_SNF
PePeScan_SNF_Index
Piolin_SSA
Playboy-Brazil
PRII
ProScanElite
PSiScan_Dannii_Minogue_97_Calendar
Puffins
Pygmalion_Faust
Qscan
RadGirls
RamoNET-SR_SSA_Index
RamoNET_SRssa2
RaScan-1998
Red_Snake
Red_Snake_SCP
Rhabdo-XXX
RipScan_NS_Celebrities&Models
RipScan_NS_Centerfolds
RipScan_NS_Espanolas
RipScan_NS_Hardbody&Fitness
Rumpous_Scans_SDC
Sabai
SabaiX
SamuraiScans
SBD_Wallpapers
Scanbaby98
ScanGarden
ScanGarden_Painted_Ladies  Scangardennonpeipaintedladies
Scheherazade
SDC
SDC_Index
SDC_Prime
SDC_Prime_Index
Searcher98
Searcher98_Extra
Selectscan_Extras
SelectScan_Index
Shadow
Shifty_Scans
SlumpScan98
Sol
Sol_Index
Spanish_PB_Covers
Springbok98
Springbok98_Index
SSA
SSA_Index
SSG98
Starlight_Graphics-2
Starscan
StarScan_Oriental
Stucco
TcN_Scans
TechScan
TechScan_Covers
TechScan_Index
Tenchi
TFScan
TFScan_Index
TFScan_Outcast
The_Night
Tinman
Tongas_TNNS1997
Tongas_TNSS1998
Tongas_TPPA1996
TRex_ScannersChoice_Index
TroChilis
UFOidx
Ultimate
Ultimate_Index
Upside-Down
UTW2
Valentino
Valiant_Boris_Valejo
Valiant_Julie_Bell
Valiant_Julie_Bell_Hardcurves
Valiant_Louis_Royo's_Malerific
Valiant_Rowena_Morrill
Venom_PNS
Viking_Bell
Viking_Royo
Viking_Sorayama
Wallpaper_Collection
Wanderer
WarScan
Weatherby_SCP  wbyscp
Wizard
ZonononZor

# All the others
-dpd:\scan\misc
* -r


cfg2
# Scansort 1.70 config file for deleting files of finished collections
-u -_ -b
# Path for CSV files 
-dcc:\scansort\finished
# Path of your collection
-dpD:\
#path for Wastebasket
-dwd:\dupes

#move all files to the dir dupes
* -pDupes -r


I have all the csv in scansort\csv until a collection is not finished and 
completed. Then the collection is moved to a burnable directory and the csv is 
moved to scansort\finished. The main advantage of this setup is that the number 
of csv, and therefore the number of files to be sorted, is much lower (= more 
speed) and I never recheck finished collections while I'm still able to delete 
files from those.
please not that new switch -rr in the 2nd line of cfg1: it's there to avoid the 
time consuming process of report generation. When I want to create/update the 
report I just do a 

scansort -rr cfg 

and they're done.
Now I rely gets on another wired machine than the one I'm using at home which 
contains all the uncompleted collections, so I must always know what I have and 
what I'm missing (that's VERY important expecially if you use a MIRC script like 
TriggerHappy to retrieve scans).
So I use the cfg1 to create a havelist with the command

scansort -rHb cfg

then I send the have.bin file to the wired machine and re-run scansort to create 
the missing report. Now I'm ready to leech my missing files using TriggerHappy 
from some kind soul ;-)


SCANSORT SOURCES OF HELP

The first thing to do when you have some doubts is looking for the documentation 
(i.e. look for scansortxxx.txt where xxx is the version). All the options may be 
seen by running scansort without options. Here it is the output:


C:\Scansort>scansort

ScanSort 1.7 - sort pictures from CSV-Files into paths
Homepage: http://www.geocities.com/SouthBeach/Pier/3193/

scansort [switches] configfile [sourcepaths]
Switches:
  -m     'm'ove files (erase source files)
  -v     more messages ('v'erbose)
  -a     check 'a'll files (regardless of extension)
  -l     don't write 'l'ogfile
  -H[vb] write list of files you 'h'ave to "have.txt" (no copy/move)
  -hNAME import list of files you 'h'ave (multiple possible)
  -sNAME process 's'ingle collection NAME (no config file)
  -exyz  set file 'e'xtension to xyz (instead of jpg)
  -b /-B always delete 'b'ad files / ignore them completely
  -E     remove 'e'xtra files from collection (after trying to identify them)
  -K     'k'ill duplicate CSV-Files
  -dcDIR set directory for CSV-files    to DIR (instead of path of config file)
  -drDIR set directory for report files to DIR (instead of current path)
  -dpDIR set target directory for pics  to DIR (instead of current path)
  -dbDIR set target directory for bad pics to DIR (instead of "BadPictures")
  -dwDIR set target directory for wastebasket,  -w don't delete to wastebasket
  -C[ecu]create/update CSV file (e: existing pics only, c: rebuild all CRCs,
  -r /-t help on 'r'eports / 't'rading |  a: all files  u: update only CRCs)
  -M     help on 'M'odel Collections

C:\Scansort>scansort -r

ScanSort 1.7 - sort pictures from CSV-Files into paths
Switches for reports:
  -r[MhmiesabcdDfSTHvs]  create reports:
  -rM -rC Mastertech-Style / Colver-Style
  -rh -rm Files you have / miss
  -ri -re incorrect / extra Files
  -rs     Summary
  -ra   = -rhmies
  -rA     report ALL collections (even empty ones)
  -rb     brief (don't include picture descriptions)
  -rc     perform CRC-Check
  -rf     freshen reports (write only those with pics copied)
  -rd -rD create descript.ion for ACDSee / as hidden files
  -rE     don't create empty reports
  -rH     write list of files you have to "have.txt"
  -rHv      "  (include descriptions)
  -rHs      "  (no comments for database import)
  -rHb      "  create binary havelist "have.bin"
  -rR     recurse collection for report (not recommended !)
  -rS     print verbose summary
  -ro     output summary to summary.txt
  -rT     create HTML tables (for my homepage ;-) )
  -rn     add numbers of have/all to the report names


C:\Scansort>scansort -t

ScanSort 1.7 - sort pictures from CSV-Files into paths

scansort [switches] configfile tradingfile
Switches for trading:
  -t[aomgzAOMGZrbfFw]  trading mode:
  -t      give help on trading
  -dt     set output directory for trading
  -ds     set source directory for giving
  -ta     make list of files to 'a'sk for
  -to     make list of files to 'o'ffer
  -tm     make list of files 'm'issing in both collections
  -tgNR   copy NR files for 'g'iving
  -tzNR   put these files in Zips with NR pics each
          (NR >= 500: make Zips of max NR kilobyte)
  -tZname set basename for Zips (default: "give")
  -tA, -tO, -tM, -tG   use verbose names for files created
  -tr     choose pics at 'r'andom
  -tb     choose pics 'b'ackwards (from the end of collection)
  -tf     'f'ake: don't copy pics
  -tF      " (don't check if source files can be found)
  -tw     trade 'w'hole collections by names (not trading files)


C:\Scansort>scansort -M

ScanSort 1.7 - sort pictures from CSV-Files into paths

scansort [switches] configfile
Switches for model collections:
  -M[cCp123456789m"Model name"]
  -M      give help on model collection
  -Mc     create a CSV (without CRCs)
  -MC     create a CSV (with CRCs)
  -Mp     copy pictures that fit
  -dt     set target directory for copy
  -M50    set fuzzy threshold to 50% (20-100, default 60)
  -MmPamela_Anderson    specify model to search for
  -Mm"Pamela Anderson"  (use quotes for spaces)
  -MnNEWNAME  rename pictures to NEWNAMExxx.jpg


The author (Stuart Redman) has an homepage at this URL:
http://www.geocities.com/SouthBeach/Pier/3193/
and may be reached at sturedman@hotmail.com for feedback, questions, new 
features request, etc.
And, of course, you can ask me ;-)
I'm on IRC-DALnet as Giallu (Robotz when I'm away). You can reach me on #SWA, 
#SDC or #SCP channels.
Or, if you want to contact me via e-mail for questions on scansort or 
suggestions about this doc please use

Robotz@bieffe-service.it

Enjoy!

