EPEX - the Enhanced Psid EXtracting utility
-------------------------------------------
I found the PEX script, written by Mike Paull, to fulfill my every need.
Almost. The thing I didn't like was that it put all converted files in
the same directory. This is my attempt at a modified script which:
a) Extracts the sid files into their proper directories
b) Adds file and directory descriptions into 4DOS' DESCRIPT.ION
A little more detailed:
a) The directory names has to be converted too. The script removes
all '.' characters in the directory name because DOS can't handle them.
It also removes any 'Unknown-' and 'Various-' prefixes. This is because
of the numerous directories in the NemeSID archive which begin with those.
Ex: F.A.M.E. => FAME
Unknown-GameTunes => GAMETUNE
Various-ABCDEF => ABCDEF
b) Since 4DOS was used, I decided to make use of it's file descriptions.
This is where the script get the descriptions from:
* Directory names: The original directory name.
* File description: The original filename, with the leading 'PSID.' removed
Ex:
Maniacs_of_Noise => MANIACS_
[date etc..] Maniacs_of_Noise
PSID.Thing_on_A-Spring => THING_ON.DAT [size date etc..] Thing_on_A_Spring
This is my first script I've written(or rather modified) in 4DOS. Therefor
it may not be pretty to look at. Neither can I guarantee that it wont harm
you or your computer. You'll have to use it at your own risk.
EPEX runs a bit slower than the original PEX script.
Example - the NemeSID-08.lha archive:
PEX Time used: 0:57
EPEX Time used: 1:08
The filename renaming procedure is the same as in the original PEX script.
The files that the original PEX script choked on, will choke this one
as well. However, I don't think I have added any incompabilities.
I've tried to make all changes and additions in the script capitalized.
The requirements are the same as for PEX.
Credits go to:
Mike Paull for the original PEX script and
Michael Schwendt for Sidplay, without which I wouldn't have made EPEX
Modifications by:
Adam Lorentzon
Since EPEX does what PEX does(but more), I'll include the PEX docs:
-----------------------------------------------------------------------------
Hi fellow PSID fans..
I don't know about you but I am sick of
the lengthy procedure that we MSDOS users have to go through when we
want to de-archive an LHA archive of PSID files created on an Amiga.
Short filenames ( PSID.Great_Music on the PC comes out as psid.gre ),
files that because of strange permissions under MSDOS become "hidden"
and characters used in Amiga filenames that are not allowed under MSDOS
( like in the file 'psid.laural+hardy' ) and so on...
Introducing PEX - the Psid EXtracting utility
So I have written a 4DOS based script to try and cope with these problems.
All you have to do is put the script file in a directory thats in your
path statement and supply it with a filename.
ie
C:/> pex nemsid01.lha
The script will extract the full Amiga filename ( PSID.R_Hubbard ) and
create an MSDOS filename by stripping the first five characters ( PSID )
off and truncating the name to eight characters ( r_hubbar ) and finally
extracting the file and renaming it to 'r_hubbar.dat' for use with
SidPlay. If there are a number of names in the archive where the first
eight characters are the same the script will take care of that by
adjusting the name so it has a numeral in it.
ie. if in the archive we had ;
PSID.R_Hubbard-01
PSID.R_Hubbard-02
PSID.R_Hubbard-03
the script would rename them to;
r_hubbar.dat
r_hubba2.dat
r_hubba3.dat
If a filename contains a '+' the script will truncate the name so that
only the characters before the '+' are used.
If the filename contains many '.' characters (ie PSID.T.h.e.F.o.r.c.e)
the '.' character will be filtered out so it becomes 'theforce.dat'
The script is not perfect. Sometimes there are some combinations of
characters and names that will cause it to barf out. In one of the
NemeSID archives there is one file that is included twice in the
archive, although each version if a different file size. For some
reason this causes MSDOS LZH to become confused and report
'file exists - overwrite Y/N' when it encounters the FIRST occurence.
Certain file permissions given to the PSID files on the Amiga seem to
translate as 'hidden' on MSDOS. So when PEX comes across this it will
change the attributes back so its available for processing.
After PEX has finished extracting and converting the filenames it will
write a file called 'names.log'. This file contains a list of all the
files that were converted, that is the original Amiga filename and the
corresponding shortened MSDOS filename.
I make no appologies for the sloppy programming techniques either. This
thing was hacked together over a limited time and I wanted to get it
going ASAP not make it an example of good programming technique.
Now, this is what you need to run the script.
You *WILL* need 4DOS. The string manipulation, math and other functions
are provided by commands built into the 4dos script language. If you
don't have this product I suggest you do yourself a favour. Aside from
having the most comprehensive script language it has many other handy
features like aliases, command historys, filename completion, online help,
enhanced MSDOS commands and much much more. 4DOS can be found on
ftp.funet.fi and wuarchive.wustl.edu and your local archie as well.
You *WILL* need LHA for MSDOS. Again available from your local MSDOS ftp
site.
And enough of MSDOS so that you have the supplied SORT and MORE commands
available.
This program will work an ANY LHA archive of PSIDs, not just the NemeSID
collection.
I provide this script as is. If you use it and for some reason it decides
to turn your PC into a puff of smoke thats your problem.
Feel free to modify it if you wish. All I ask is that you ;
(A) Leave my name in it so as the original author I get some credit
(B) You post the enhanced version in the appropriate newsgroups so we
can all enjoy the new features.
(C) Upload it to any FTP sites you know sid freaks visit!
Ok, in the next message will be the source. Try to keep any questions
to this group rather than email as your questions may affect others
and so may the answer. Email me only if necessary.
Mike Paull