script to toggle between xyplorer and teracopy copy handlers

Discuss and share scripts and script files...
Post Reply
kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

script to toggle between xyplorer and teracopy copy handlers

Post 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;
}

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: script to toggle between xyplorer and teracopy copy hand

Post 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")
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: script to toggle between xyplorer and teracopy copy hand

Post by kotlmg »

hello binocular222,
thanks for your code. i need code to toggle.

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: script to toggle between xyplorer and teracopy copy hand

Post 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"}
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

admin
Site Admin
Posts: 66293
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: script to toggle between xyplorer and teracopy copy hand

Post 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();

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: script to toggle between xyplorer and teracopy copy hand

Post 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.

highend
Posts: 14942
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: script to toggle between xyplorer and teracopy copy hand

Post by highend »

Code: Select all

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

Code: Select all

If( $Copier == "TeraCopy") { copier(""); $Copier = "XYcopy"};
One of my scripts helped you out? Please donate via Paypal

binocular222
Posts: 1423
Joined: 04 Nov 2008 05:35
Location: Win11, Win10, 100% Scaling

Re: script to toggle between xyplorer and teracopy copy hand

Post 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?
I'm a casual coder using AHK language. All of my xys scripts:
http://www.xyplorer.com/xyfc/viewtopic. ... 243#p82488

kotlmg
Posts: 321
Joined: 30 Jun 2010 17:14

Re: script to toggle between xyplorer and teracopy copy hand

Post by kotlmg »

thanks a lot highend.
script is perfectly working.

Post Reply