On 21/07/2013 18:04, [email protected] wrote:
On Sun, 2013-07-21 at 17:02 +0100, Terence wrote:
Example: C: & cd "\Program Files\get_iplayer\" &
"%Windir%\system32\cmd.exe" /c get_iplayer --type=tv "987" --get
--vmode=best --output="\downloads\media\" --subdir
set FPLACE=--subdir
I know that would just set FPLACE to --subdir which is no good. I want
FPLACE to be set to what --subdir represents.
If --subdir does what I think, makes a directory named the same as the
programme, then this should set FPLACE to be the name of the most
recently modified directory in the current directory.
for /f "tokens=1 delims=" %a in ('"dir /b /a:d /o:d"') do @set FPLACE="%
a"
I think you would need to run that DIR command on the output directory,
not the working directory, which in the example is the get_iplayer
installation directory.
If you just want to move the subdirectory after the download is
complete, use --command with a command formulated with the <dir>
substitution parameter, which contains the value you need. No need for
an extra step.
_______________________________________________
get_iplayer mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/get_iplayer