GrabDiz.bat, this runs the batch files...
Call GetDiz.bat
Rename-Diz.bat
--------------------------------------------------------------------------------------------
GetDiz.bat, the gets the File_id.diz & save it as the same name as the zip
files but the diz will have the extention .zip.diz & this is the main bact
file that does the main work...
if not (%1) == () goto GetDiz
for %%a in (*.zip) do call GetDiz %%a
goto end
:GetDiz
set Diz=%1
pkunzip -e %1 File_id.diz
ren File_id.diz %Diz%.diz
ren *.zip.diz *.diz
:end
--------------------------------------------------------------------------------------------
Rename-Diz.bat, this batch file moves the diz file to a temporary directory to
change the file extention from .zip.diz to .diz & moves the diz files back to
the original directory...
md Diz's
move *.zip.diz Diz's
cd Diz's
ren *.zip.diz *.
ren *.zip *.diz
move *.diz ..
cd..
rd Diz's
--------------------------------------------------------------------------------------------
ZipFix.bat, Oh, here is a old batch file we made in BatPower a long time ago
that does runs PKZIPFIX automatically...
if not (%1) == () goto pkzipfix
for %%a in (*.zip) do call pkzipfix %%a
goto end
:pkzipfix
pkzipfix %1
del %1
ren pkfixed.zip %1
:end
--------------------------------------------------------------------------------------------
My program that does diz the files does not work with Windows XP so I am
thinking of just writing a batch file that will diz the files, even my CD
catalog program does not work with XP so I will have to write something to
replace it unless I slap a virtual machine on the system & run 98 just to run
my DOS programs, I even had a Tic Tac Toe batch file game that ran on DOS 6.22
but it would not run on 95 or 98.
I hope this helps folks out...
http://www.filegod.netfirms.com
*** I may be misunderstanding what you are doing, but can one not just:
PKZIP File_id.ZIP File_id.diz
If you want to delete the .diz file at the same time:
PKZIP -m File_id.ZIP File_id.diz
To restore:
PKUNZIP File_id.ZIP
DEL File_id.ZIP
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
As a FileGod, you should have no problem handling files on XP.
Cleaning up your website, both visually and grammatically, might make it
more appealing to your readers. That is just my opinion. HTH
--
Todd Vargo
(Post questions to group only.)
I distilled FileGod's text to hopefully help with your confusion.
File_id.diz represents a non-static name nor the same basename as the zip,
hence, his code is intended to extract *.diz from the zip and rename it to
the basename of the zip.
FWIW, I don't find it of particular interest to me.
--
Todd Vargo
(Post questions to group only. Remove "z" to email personal messages)
Correction: File_id.diz is a static name.
> FWIW, I don't find it of particular interest to me.
BTW, the following single batch performs what FileGod used 2 batch files to
accomplish and without need to clean up the double .zip.diz extensions.
Note, like FileGod's code, this batch only operates on 8.3 filenames as I
don't find the batch of particular use to bother including LFN with spaces
support.
@echo off
if not (%1)==() goto GetDiz
if exist File_id.diz del File_id.diz
md Diz's
for %%a in (*.zip) do call %0 %%a
rd Diz's
set basename=
goto end
:GetDiz
cd Diz's
echo.>%1
ren %1 *.
for %%? in (*.*) do set basename=%%?
del %basename%
cd..
pkunzip -e %1 File_id.diz
ren File_id.diz %basename%.diz
:end
Interesting yrmp folder name there!
> Cleaning up your website, both visually and grammatically, might make it
> more appealing to your readers. That is just my opinion. HTH
> --
> Todd Vargo
*** He does seem to have a problem with apostrophes and commas.
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
> Richard Bonner wrote:
> > FileGod wrote:
> ...
> > > I decided to write a bacth file that...
> > > grabs the File_id.diz from zip files & save them as the same name as the
> > > > zip files but with the extention .diz since there have been a lot
> > > of files I downloaded more than once, these are automating batch
> > > files so do not type in a file name when running these batch files...
> > (Snip)
> >
> > *** I may be misunderstanding what you are doing...
> I distilled FileGod's text to hopefully help with your confusion.
*** Thanks, I appreciate that.
> File_id.diz represents a non-static name nor the same basename as the zip,
> hence, his code is intended to extract *.diz from the zip and rename it to
> the basename of the zip.
*** Ahh. Ok, in that case, I'd use 4DOS'S "FOR"command or XSET to
separate the filename from its extension and place it into a variable.
Then:
PKZIP %FILENAME%.ZIP %FILENAME%.DIZ
> FWIW, I don't find it of particular interest to me.
> --
> Todd Vargo
*** It is to me because I often need the filename without an extension
to have batch files do the type of file manipulations I typically require.
Richard Bonner
http://www.chebucto.ca/~ak621/DOS/
That is not what I had in mind at all. But IMO, posting specific nit-picks
in a newsgroup is inappropriate, therefore, I will refrain from further
comment.
--
Todd Vargo