*I REALLY DOUBT* this is going to work.
Anyway, it's
-unpacking .rar,
-reading file as BINARY,
-writing the info regardless of any header info,
-cleaning temp remainders.
To do:
icons, better captions, smart checking on eventual user errors.
If anyone has a better idea or other inputs for this, please do so - I can't even find the time to produce test files myself and those provided by Slavaon find no support on my machine.
@Slavaon: is DSC_6328.jpg a converted file from all those .xmp?
Sizes:
700.877 bytes: DSC_6328.jpg
105.956 bytes: 17 .xmp
105.956 bytes: combined .xmp (so they're combined de facto!, and I'd bet all those headers combined are damaging the resulting file. But, can't say for sure...)
Sorry for so very late reply. Being very busy lately. I mean: *VERY!*
Code: Select all
"rar"
$ext = ".xmp"; // WITH dot!
$exe = get("regcmd", "rar");
// step;
$getx = gettoken($exe, -2, ".", 2);
$getx = gettoken($getx, 2, "=");
$exe = trim($getx, '"');
$exe = trim($exe, ' ');
$exe = "$exe" . ".exe";
$a = get(selecteditemspathnames);
foreach($tk, "$a", "<crlf>") {
// step;
focus;
$nm = getpathcomponent("$tk", base);
$tk2 = quote("$tk");
run "$exe" "x" $tk2, , 2;
$b = readfile("$nm" . "$ext", b);
// step;
writefile("NewFile" . "$ext", "$b", a, b);
// step;
delete 1, 0, "<curpath>\" . "$nm" . "$ext";
status "done: $nm...";
}
echo "all done, anyway...";
"non-rar"
$a = get(selecteditemspathnames);
foreach($tk, "$a", "<crlf>") {
// step;
focus;
$nm = getpathcomponent("$tk", base);
$ext = getpathcomponent("$tk", ext);
$b = readfile("$tk", b);
// step;
writefile("NewFile." . "$ext", "$b", a, b);
status "done: $nm...";
}
echo "all done, anyway...";