cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki@echo off
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset ext=
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset file=
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki:loop
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki@set arg=%1
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "" goto end
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg:~0,1%" == "+" goto next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "-t" goto next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "ds" goto ds
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "DS" goto ds
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "dlv" goto dlv
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "DLV" goto dlv
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "dnskey" goto dnskey
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiif "%arg%" == "DNSKEY" goto dnskey
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset file=%arg%
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickigoto next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki:ds
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset ext=ds
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickigoto next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki:dlv
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset ext=dlv
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickigoto next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki:dnskey
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset ext=dnskey
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickigoto next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki:next
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickishift
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickigoto loop
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki:end
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecicki
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickiset name=%file%.%ext%.db
cc51cd2d2076e33117c60c9effcb8caccde4983bWitold Krecickitype %name%