OK, I think I finished tweaking the "code". I don't think I will mess around with it more, as I really don't need it, and it's easy to expand - to add "ace" support, maybe. And yes, this code may contain errors, so don't complain on me if something goes wrong
I also inserted some C-style comments for the $if-s, so they would be easier to understand for you. For me, they are rather disturbing, though
//here you can set the destination directory
$puts(destination,'"C:\temp mp3"')
//Should this script overwrite without prompting?
$puts(overwrite,'no')
$puts(source,$left(%_path%,$sub($strchr(%_path%,|),1)))
$puts(filename,'"'$right(%_path%,$sub($len(%_path%),$strchr(%_path%,|)))'"')
$puts(type,$right($get(source),3))
//works well, if parameter ordering is "source - files - destination"
//you have to give the extraction switch in too if theres is one
$if($strcmp($get(type),'rar'),
//if type=='rar' {
$puts(extractor,'unrar x')
//if overwrite=='yes'{
$if($strcmp($get(overwrite),'yes'),$puts(extractor,$get(extractor)' -y'),),
//}
$if($strcmp($get(type),'zip'),
//} else if type=='zip' {
$puts(extractor,'unzip32')
//if overwrite=='yes' {
$if($strcmp($get(overwrite),'yes'),$puts(extractor,$get(extractor)' -o'),),
//}
//} else {
$puts(extractor,'copy')
//if overwrite=='yes' {
$if($strcmp($get(overwrite),'yes'),$puts(extractor,$get(extractor)' /Y'),
//} else {
$puts(extractor,$get(extractor)' /-Y'))
//}
//}
)
)
//to have " " around the source's name
$puts(source,'"'$get(source)'"')
$ansi(
'@'
'if not exist' $get(destination)
' md' $get(destination)
$crlf()
'@'
$if($strchr(%_path%,|),
$get(extractor) $get(source) $get(filename)
$if($strcmp($get(type),'zip'),'-d',) $get(destination)
,
$get(extractor) '"'%_path%'"' $get(destination)
)
)
Still not the context-menu plugin you wished for, but I'm not so familiar with the sdk
architecture, so I won't be messing with that. Maybe the renamer plugin could be
modified to something like this, maybe like writing the files to the specified directory
and to their original directory too, but that's quite ugly. And I definitely won't
do that, maybe if you could convince more qualified plugin writers like Case, kode54 or foosion...