IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
Batch ape decode
WaldoMonster
post May 7 2007, 11:23
Post #1





Group: Members
Posts: 234
Joined: 18-September 02
From: the Netherlands
Member No.: 3392



How can I do a batch ape decode?
Something like this doesn’t work:

CODE
C:\path\mac *.ape -d

or
CODE
for %%i in (*.ape) do (C:\path\mac "%%i" -d & if errorlevel 1 pause)



I assume you must specify the output wave file.
Does someone have a solution for this?


--------------------
netjukebox - the flexible media share
http://www.netjukebox.nl
Go to the top of the page
+Quote Post
Synthetic Soul
post May 7 2007, 11:36
Post #2





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



You could use my ape-decode.bat. Drag a folder or file onto the icon to run. You will need to edit the file and change the pathToMac variable.

A command line alternative would be:

CODE
for %%i in (*.ape) do (C:\path\mac "%%i" "%%~dpni.wav" -d & if errorlevel 1 pause)

... which should decode all ape files to a wav of the same name, in the source folder.


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post
WaldoMonster
post May 7 2007, 11:49
Post #3





Group: Members
Posts: 234
Joined: 18-September 02
From: the Netherlands
Member No.: 3392



Works perfectly.

A assume ~dpni is a functionality for batch variables.
Could be handy for other situations to.
I haven't found any documentation for that on the internet yet.
Any link would be helpful.


--------------------
netjukebox - the flexible media share
http://www.netjukebox.nl
Go to the top of the page
+Quote Post
Synthetic Soul
post May 7 2007, 12:00
Post #4





Group: Super Moderator
Posts: 4887
Joined: 12-August 04
From: Exeter, UK
Member No.: 16217



Try running:

CODE
FOR /?

You'll have to page down a bit to see:

CODE
In addition, substitution of FOR variable references has been enhanced
You can now use the following optional syntax:

    %~I         - expands %I removing any surrounding quotes (")
    %~fI        - expands %I to a fully qualified path name
    %~dI        - expands %I to a drive letter only
    %~pI        - expands %I to a path only
    %~nI        - expands %I to a file name only
    %~xI        - expands %I to a file extension only
    %~sI        - expanded path contains short names only
    %~aI        - expands %I to file attributes of file
    %~tI        - expands %I to date/time of file
    %~zI        - expands %I to size of file
    %~$PATH:I   - searches the directories listed in the PATH
                   environment variable and expands %I to the
                   fully qualified name of the first one found.
                   If the environment variable name is not
                   defined or the file is not found by the
                   search, then this modifier expands to the
                   empty string

The modifiers can be combined to get compound results:

    %~dpI       - expands %I to a drive letter and path only
    %~nxI       - expands %I to a file name and extension only
    %~fsI       - expands %I to a full path name with short names only
    %~dp$PATH:i - searches the directories listed in the PATH
                   environment variable for %I and expands to the
                   drive letter and path of the first one found.
    %~ftzaI     - expands %I to a DIR like output line

In essence %~dpnI will return the drive, path and filename excluding extension (which can be retrieved using %~xI) of the variable.


--------------------
I'm on a horse.
Go to the top of the page
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 29th August 2014 - 10:43