ZTree.com  | ZEN  | About...  

 Index   Back

[Help!] Batch on tagged files   [Help!]

By: Ben Kent       
Date: Dec 18,2019 at 18:31
In Response to: [Help!] Batch on tagged files (Laurent Duchastel)

> > > Hi,
> > >
> > > I have many comics in both cbr (rar) and cbz (zip) formats. My most
> > > recent reader however doesn't support well cbr. I want to convert
> > cbr's
> > > into cbz's.
> > >
> > > Here is the F9 script that works well on an individual file.
> > >
> > > ::- Convert cbr into cbz
> > > #ZTTools\rar x -r -AD %1 "%TEMP%"
> > > #ZTTools\7z.exe a -tzip "%4.cbz" "%TEMP%\%4\*" -r -mx9 -stl
> > > -sdel
> > > rmdir "%TEMP%\%4" /Q
> > >
> > >
> > > What script would do the same operation on a set of tagged files?
> > >
> > > Thank you in advance
> >
> > Laurent
> >
> > I use this general form to handle the current file if no tagged
> files,
> > or work through the tagged files.
> >
> > Replace "Echo process %%1" with your doing code.
> >
> > ====================
> > REM #ZTTag #ZTTemp\~ZTTag.bat -fCALL #ZTTemp\ZTW_MENU.BAT SUB1 %1
> > IF [%%1]==[SUB1] GOTO Sub1
> >
> > SET ZTTagged=False
> > REM #ZTIfTagged SET ZTTagged=True
> > IF [%%ZTTagged%%]==[False] (
> > Call :NoTag %1
> > ) ELSE (
> > CALL #ZTTemp\~ZTTag.bat
> > DEL #ZTTemp\~ZTTag.bat
> > )
> > PAUSE
> > goto :eof
> >
> > :Sub1
> > SHIFT
> > :NoTag
> > Echo process %%1
> > goto :eof
> > ====================
> >
> > Ben
>
>
> Thank you Ben
>
> Thought about this but I need a mix of %1 and %4 in the subroutine.
> How can I do this?

In that section you don't have the numbered ZTree % expanders.
But you can use the shell ones
%4 is equivalent to %%~n1

Ben

153 views      
 

Messages in this Thread

 
94,800 Postings in 11,952 Threads, 348 registered users, 12 users online (2 registered, 10 guests)
Index | Admin contact |   Forum Time: Mar 31, 2020 - 6:03 pm EDT  |  Hits:30,519,937  (4,168 Today )
RSS Feed