Page 1 of 1

script to toggle between xyplorer and teracopy copy handlers

Posted: 04 Jan 2014 06:32
by kotlmg
i am using the following script to copy diferent folders data to selected path.
i think it is using xyplorer's default copy handler. when i made xyplorer to use teracopy as external copy handler. this script is giving me trouble. for the smooth running of this code, every time i am making xyplorer as default copy handler and running this code.
hence i need a small script to toggle between different copy handlers and i want to assign this code to button.

thanks in advance.

/* 18.11.2011, Move files and contents of folders to a different (new) folder
::load "<xyscripts>\.snippets\MoveToNewDestination.xys";
*/

$Methode = inputselect(Choose methode for Moving files:, "Browse|Type Path", , 2);

if ($Methode=="Type Path"){
$destination = input("Enter target path");
} else {
$destination = inputfolder( ,select destination folder to move to);
}
setting('BackgroundFileOps', 0);
$FolderList = get("SelectedItemsPathNames", "|");

foreach($FLD, $FolderList)
{
if (exists($FLD)==2)
{
$content = folderreport("files", "r", $FLD, "r", , "|");
foreach($Item, $content)
{
moveto $destination, $Item;
}
} else {
moveto $destination, $FLD;
}
delete 1, 0, $FLD;
}

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 04 Jan 2014 11:20
by binocular222
Customize this:

Code: Select all

"FastCopy|<xyscripts>\FastCopy\x32\FastCopy.exe" copier("FastCopy|<xyscripts>\FastCopy\x32\FastCopy.exe|/auto_close")
"TeraCopy|<xyscripts>\TeraCopy\TeraCopy.exe" copier("TeraCopy|<xyscripts>\TeraCopy\TeraCopy.exe|/Close /open_window")
"XYcopy|<xypath>\XYcopy.exe" copier()
But for the toggle thing, well, I don't see any way to get the current copier.
Maybe you should make a wish to Don for ::get("copier")

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 05:48
by kotlmg
hello binocular222,
thanks for your code. i need code to toggle.

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 12:08
by binocular222
a workaround:

Code: Select all

 perm $Copier;
 If( $Copier == "FastCopy") { copier(); $Copier = "XYcopy"};
 Else { copier("FastCopy|<xyscripts>\FastCopy\x32\FastCopy.exe|/auto_close"); $Copier = "FastCopy"}

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 12:11
by admin
binocular222 wrote:I don't see any way to get the current copier.
Maybe you should make a wish to Don for ::get("copier")
This way:

Code: Select all

echo copier();

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 13:50
by kotlmg
hello sir the following script is toggling xycopy to teracopy.
i want to toggle between both. ie. from xycopy to tera and tera to xycopy.

Code: Select all

    perm $Copier;
    If( $Copier == "TeraCopy") { copier(); $Copier = "XYcopy"};
    Else { copier("TeraCopy|C:\Program Files (x86)\TeraCopy\TeraCopy.exe|/Close /open_window"); 
    $Copier = "TeraCopy"}
    echo copier();
please give the modified code to the above requirement.

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 14:30
by highend

Code: Select all

If( $Copier == "TeraCopy") { copier(); $Copier = "XYcopy"};
Change to:

Code: Select all

If( $Copier == "TeraCopy") { copier(""); $Copier = "XYcopy"};

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 15:00
by binocular222
@Don: I tried echo copier() before but it return blank (should be XYcopy) so I thought it was broken.

So, maybe changing the return value to XYcopy instead of blank would make sense?

Re: script to toggle between xyplorer and teracopy copy hand

Posted: 05 Jan 2014 16:48
by kotlmg
thanks a lot highend.
script is perfectly working.