You are on page 1of 3

Another Approach To Avoid Collision Of Names

owing to image-counter overflow of the camera


(bilingual edition)
Magyar olvask figyelmbe: az angol szveg utn van magyarul.
(Notice to Hungarians: text in Hungarian there is after the English.)
As you have seen one method in Author's publication, Support To Rename Very Many
Files, it has been noticed, altough it is a good practice for any files, it is not an efficient way for
photographs, namely to rename ten thousand images subsequently; but it is better to do this
previously, when you move just about a hundred of photos from the camera to the computer.
Thus the Author uses his RenG command (Rename Generator) only for general purposes,
while to move and rename photos he developed his Foto command as you can see in the
Appendix; moreover, you may easily adapt it to your system and camera freely. Do not forget set
USB configuration of the camera to suitable behavior: the operating system must recognize it as a
disk drive. Nevertheless, if you want handle photos in your control, this is the correct setting.
With this method you can keep photos to be named individually in chronological order. The
little modification, that is, the truncating factory identification onto 3 characters, is not significant
but with 5 digits the problem of camera counter overflow is solved up to 99999 images. So the
last possible name will be HPI99999.JPG instead of HPIM9999.JPG what the camera
made. Of course, at each overflow, you must modify one certain line in the FOTO.BAT
procedure: see the Appendix.
Otherwise, the Author rather likes Windows long names instead of old 8-character DOS style,
what the camera makes. Therefore, he published his new command JPeG.exe, with which you
can rename very many images based upon their EXIF data in this form:
[+]date[?]time[?][@][?][#]
where + is optional century in 2 digits, as you can give how many digits the year has (2 or 4);
date has 6 digits (years-months-days); time has the same (hours-minutes-seconds); ? is one
separator (it may be '_-!) as you can give it; @ is origin what you can give how many
characters will be kept from left and right side of the old name; # is an automatic sequence
number (up to 999) to avoid possible collision, if needed.
For more information, read through the Author's publication Command Generator To
Rename JPEG Images, in which you will have found JPeG.exe enclosed as Base 64
encoded text, and the source program is included too.

USB Configuration
Specifies how a computer recognizes the device.
Digital Camera (Default) Recognizes the device as a digital camera using PTP (Picture
Transfer Protocol).
Disk Drive Recognizes the device as a disk drive using MSDC (Mass Storage Device
Class).

-1-

Ms megkzelts nvtkzs ellen


fnykp-szmll tforduls miatt
(ktnyelv kiads)
Miutn lttuk Szerz egyik mdszert a Tmeges tnevezs tmogatsa kiadvnyban,
szre kell vennnk, hogy az ugyan gyakorlatilag brmely llomnyhoz j, fnykpekhez mgsem
hatkony tzezer kp utlagos tnevezsvel; hiszen jobb ezt elre megtenni, amikor csupn
mintegy szz kpet visznk t a kamerbl a szmtgpre.
Ezrt Szerz a RenG (REName Generator) parancst csak ltalnos clokra hasznlja, mg a
fotk tvitelre s tnevezsre a Foto parancst fejlesztette ki, ami a Fggelkben lthat;
tovbb knnyen idomulhat sajt rendszernkhz s kamernkhoz ingyen. Ne felejtsk el a
kamera USB konfigurcijt a megfelel viselkedsre belltani: a mkdtet rendszernek
lemezmeghajtknt kell felismernie a kszlket. Egybknt is ez a helyes bellts, ha a fotkat a
magunk ignyei szerint akarjuk kezelni.
E mdszerrel egyedileg elnevezve idrendben tarthatjuk a fnykpeket. Az a kis mdosts,
hogy a gyri azonostt 3 jelre cskkentjk, nem jelents, viszont 5 szmjeggyel a fnykpszmll tforduls feladatt 99999 kpig megoldottuk. Vagyis az utols lehetsges nv
HPI99999.JPG lesz HPIM9999.JPG helyett amit a kamera adott. Termszetesen minden
tfordulskor mdostanunk kell egy bizonyos sort a FOTO.BAT eljrsban: lsd a Fggelket.
Egybknt a Szerz a kamera 8-jel, rgi DOS jelleg nevei helyett szvesebben hasznlja a
Windows hossz neveket. Ezrt kzztette j JPeG.exe parancst, amellyel tmegesen lehet
tnevezni a kpeket ler adataik (EXIF) alapjn ebben az alakban:
[+]kelt[?]id[?][@][?][#]
ahol + krhet 2-jegy vszzad, mivel megadhat, hogy hny jegy az v (2 vagy 4); kelt
6-jegy (v-h-nap); id ugyangy (ra-perc-msodperc); ? krhet elvlaszt, ami '_-!
kzl valamelyik; @ krhet eredet, amelyhez megadhat, hogy a rgi nvbl hny jelet tartsunk
meg balrl s jobbrl; # nmkd sorszm (999-ig) ha kell, hogy a lehetsges tkzst
elkerljk.
Mindezt bvebben a Szerz Parancsgenertor JPEG kpek tnevezsre kiadvnyban
olvassuk el, amelyben meg fogjuk tallni a Base 64 kdols JPeG.exe mellkletet s annak
forrsprogramjt is.

USB-konfigurci
Meghatrozza, hogy a szmtgp milyen eszkzknt azonostsa a fnykpezgpet.
Digitlis kamera (Alaprtelmezett) PTP (Picture Transfer Protocol) protokolt hasznl
digitlis kameraknt azonostja a fnykpezgpet.
Lemezmeghajt MSDC (Mass Storage Device Class) lemezmeghajtknt azonostja a
fnykpezgpet.

Appendix / Fggelk
FOTO.BAT
See the next page / Lsd a kvetkez lapon
-2-

@echooff
set#=C
:ifexistC:\DCIM\*.*gotoJremSystem
set#=D
:ifexistD:\DCIM\*.*gotoJremData
set#=E
:ifexistE:\DCIM\*.*gotoJremDVDdrive
set#=F
ifexistF:\DCIM\*.*gotoJ
set#=G
ifexistG:\DCIM\*.*gotoJ
set#=H
ifexistH:\DCIM\*.*gotoJ
echoThehpDigitalCameraisnotready!
echoAhpfotomasinanincsbekapcsolva!
gotoX
:J
ifexist%#%:\DCIM\100HP425\*.JPGgotoM
ifexist%#%:\DCIM\100HP425\*.AVIgotoM

echoTherearenotanyphotos/videosinthehpDigitalCamera!
echoAhpfotomasinanemtartalmazfotot/videot!
gotoX
:M
D:
cd\HP425
iferrorlevel1gotoE
gotoG
:E
echoFolderD:\HP425ismissing,createitagain!
echoNincsmegaD:\HP425mappa,ptolni!
gotoX
:G
cd%#%:\DCIM\100HP425
move%#%:*.*.
renHPIM*.*hpI1*.*
Rem!2Nextnumberofoverflow
Rem!Tlcsordulskvetkezszma
echoCompletedyoumayswitchitoff.
echoBefejezvekikapcsolhatja.
cd%#%:\
:X
set#=
pauseStartablewithclickingtoo/Kattintssalisindthat(!)
:

-3-

You might also like