TeraCopy Integration

Discuss and share scripts and script files...
admin
Site Admin
Posts: 60288
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Post by admin »

Muroph wrote:Updated to v3.2 after the %temp% bug fix.
I see it's getting smaller... :) when I'm back from the beach I will add a scripting command that will copy items directly into a variable, so you do not have to go the clipboard way:

Now:

Code: Select all

//copy items to clipboard and save in a variable 
 #101; 
 set $items, <clipboard>;
Then:

Code: Select all

  getitems $items;

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Post by Muroph »

admin wrote:when I'm back from the beach I will add a scripting command that will copy items directly into a variable, so you do not have to go the clipboard way:

Now:

Code: Select all

//copy items to clipboard and save in a variable 
 #101; 
 set $items, <clipboard>;
Then:

Code: Select all

  getitems $items;
if it's meant only to assign a variable value, i think it'd be better if it was actually a new variable (like the <curitem> var.) instead of a command.
this way you could use it directly.

Code: Select all

setkey <selitems>, sec, asd.ini;
if it were a command you'd have to create a variable in order to use it.

Code: Select all

getitems $items;
 setkey $items, sec, asd.ini;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

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

Post by admin »

Muroph wrote:
admin wrote:when I'm back from the beach I will add a scripting command that will copy items directly into a variable, so you do not have to go the clipboard way:

Now:

Code: Select all

//copy items to clipboard and save in a variable 
 #101; 
 set $items, <clipboard>;
Then:

Code: Select all

  getitems $items;
if it's meant only to assign a variable value, i think it'd be better if it was actually a new variable (like the <curitem> var.) instead of a command.
this way you could use it directly.

Code: Select all

setkey <selitems>, sec, asd.ini;
if it were a command you'd have to create a variable in order to use it.

Code: Select all

getitems $items;
 setkey $items, sec, asd.ini;
A command would allow for specifying a separator in an argument:
getitems output, [separator=CRLF]

Okay, one could also think about something like this:
<selitems [separator=CRLF]>
which would effectively be a function like:
result=selitems([separator=CRLF])

I've been thinking about functions anyway...

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Post by Muroph »

Updated to v4.1

TeraCopy Integration v4.1

You need XYplorer 7.30.0008 and Teracopy v2.0 beta3.

Now the script uses only one file.

Cut

Code: Select all

//copy list of items to a variable
 #101;
 set $items, <clipboard>;
 //save list path
 set $list, <xypath>\teracopylist.tmp;
 //delete old list
 setkey avoid possible, error, message, $list;
 delete 0,0, $list;
 //save operation and list of items
 setkey move, teracopyop, tc, $list;
 setkey <crlf>$items, teracopylist, tc, $list;
 status TeraCopy: Cut, , ready;
Copy

Code: Select all

//copy list of items to a variable
 #101;
 set $items, <clipboard>;
 //save list path
 set $list, <xypath>\teracopylist.tmp;
 //delete old list
 setkey avoid possible, error, message, $list;
 delete 0,0, $list;
 //save operation and list of items
 setkey copy, teracopyop, tc, $list;
 setkey <crlf>$items, teracopylist, tc, $list;
 status TeraCopy: Copy, , ready;
Paste
Change teracopy.exe path if necessary.

Code: Select all

//save current path. this will be the target folder
 set $path, <curpath>;
 //restore operation type
 getkey $op, teracopyop, tc, <xypath>\teracopylist.tmp;
 //run teracopy.exe using command line parameters
 //teracopy.exe [operation] *[list of source files] [target]
 run ""%programfiles%\TeraCopy\teracopy.exe" $op *"<xypath>\teracopylist.tmp" "$path\"";
 status TeraCopy: Paste, , ready;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Post by Muroph »

v4.1 is out!

in v4.0 i tried to get rid of the temp files by deleting them.
after running into a bunch of problems using the delete command (especially because of the time-based names of the temp files), the resulting scripts were awful, so i just had to rewrite them.

this time i tried a new approach.
just one file (with a constant name) to store both the operation and the list of items (they were in different files before).
the new scripts are MUCH better than the old ones.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

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

Post by admin »

Muroph wrote:v4.1 is out!

in v4.0 i tried to get rid of the temp files by deleting them.
after running into a bunch of problems using the delete command (especially because of the time-based names of the temp files), the resulting scripts were awful, so i just had to rewrite them.

this time i tried a new approach.
just one file (with a constant name) to store both the operation and the list of items (they were in different files before).
the new scripts are MUCH better than the old ones.
Looks great. I guess it's time to install TeraCopy now... :)

jgpaiva
Posts: 43
Joined: 02 Oct 2006 12:38

Post by jgpaiva »

Hello!
Thanks for the script, it looks like it's great!
I think there's some strange problem in xy v7.30.0006 with the most recent version of the script: The selected file always gets deleted.
From what I understand, that happens when the script tries to delete the temporary file, and even though the variable isn't null, the selected file gets deleted instead.
It wouldn't be the first time it was just me doing something wrong, though :)

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Post by Muroph »

if you're using v4.1 you need xy v 7.30.0008 or later.
v4.0 had some bugs (including the one you mentioned), so use v4.1 instead.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

jgpaiva
Posts: 43
Joined: 02 Oct 2006 12:38

Post by jgpaiva »

Muroph wrote:if you're using v4.1 you need xy v 7.30.0008 or later.
v4.0 had some bugs (including the one you mentioned), so use v4.1 instead.
You are absolutelly right, I didn't notice I didn't have the latest version of XY. With v7.30.0012, it works perfectly. Thanks! :D

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Re: TeraCopy Integration

Post by Muroph »

Updated to v4.2
Fixed to work with the new script syntax in XYplorer v7.50.0001.

Cut

Code: Select all

//copy list of items to a variable
  #101;
  set $items, <clipboard>;
  //save list path
  set $list, "<xypath>\teracopylist.tmp";
  //delete old list
  setkey avoid possible, error, message, $list;
  delete 0,0, $list;
  //save operation and list of items
  setkey move, teracopyop, tc, $list;
  setkey <crlf>$items, teracopylist, tc, $list;
  status TeraCopy: Cut, 84C400, ready;
Copy

Code: Select all

//copy list of items to a variable
  #101;
  set $items, <clipboard>;
  //save list path
  set $list, "<xypath>\teracopylist.tmp";
  //delete old list
  setkey avoid possible, error, message, $list;
  delete 0,0, $list;
  //save operation and list of items
  setkey copy, teracopyop, tc, $list;
  setkey <crlf>$items, teracopylist, tc, $list;
  status TeraCopy: Copy, 84C400, ready;
Paste

Code: Select all

//save current path. this will be the target folder
  set $path, <curpath>;
  //restore operation type
  getkey $op, teracopyop, tc, "<xypath>\teracopylist.tmp";
  //run teracopy.exe using command line parameters
  //teracopy.exe [operation] *[list of source files] [target]
  run """%programfiles%\TeraCopy\teracopy.exe" $op *"<xypath>\teracopylist.tmp" "$path\""";
  status TeraCopy: Paste, 84C400, ready;
EDITED: fixed the damn spaces that were mercilessly killed by the forum sotfware
Last edited by Muroph on 12 Sep 2008 19:52, edited 3 times in total.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Re: TeraCopy Integration

Post by lukescammell »

Muroph wrote:Use them like the normal ctrl+x/ctrl+c/ctrl+v.

Before using them you'll have to create a folder to save a list of the items you want to copy.
I used 'scripts\teracopy' in xy folder.
How do you achieve this first part (the XCV key shortcuts).

And is this second part still needed with 4.1?
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Re: TeraCopy Integration

Post by Muroph »

1. you can create a "run script" udc and paste the script in the edit box, then assing a ks for it.
do this for separatly for each one of the 3 scripts.
there's a step-by-step guide here.
or you can save each one in a .xys file and create 3 "load script file" udc's.

i use .xys files and alt+x/c/z (alt+v pops up the view menu).

2. nope. that was only for the first version.
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

lukescammell
Posts: 744
Joined: 28 Jul 2006 13:15
Location: Kent, UK
Contact:

Re: TeraCopy Integration

Post by lukescammell »

Thanks for that :) I've found that there's some strange results coming up with TeraCopy beta4 x64, but I'll try and figure it out myself first before throwing myself upon your mercy again...;)
Used to update to the latest beta every day. Now I have children instead…
Windows 10 Pro x64 (everywhere except phone…)

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Re: TeraCopy Integration

Post by Muroph »

Updated to v4.3
No more need for the clipboard.
Can be used with XYplorer v7.60.0005.

Cut

Code: Select all

//copy list of items to a variable
  getinfo $items, "SelectedItemsPathNames";
  //save list path
  set $list, "<xypath>\teracopylist.tmp";
  //delete old list
  setkey avoid possible, error, message, $list;
  delete 0,0, $list;
  //save operation and list of items
  setkey move, teracopyop, tc, $list;
  setkey <crlf>$items, teracopylist, tc, $list;
  status TeraCopy: Cut, 84C400, ready;
Copy

Code: Select all

//copy list of items to a variable
  getinfo $items, "SelectedItemsPathNames";
  //save list path
  set $list, "<xypath>\teracopylist.tmp";
  //delete old list
  setkey avoid possible, error, message, $list;
  delete 0,0, $list;
  //save operation and list of items
  setkey copy, teracopyop, tc, $list;
  setkey <crlf>$items, teracopylist, tc, $list;
  status TeraCopy: Copy, 84C400, ready;
Paste (no changes here)

Code: Select all

//save current path. this will be the target folder
  set $path, <curpath>;
  //restore operation type
  getkey $op, teracopyop, tc, "<xypath>\teracopylist.tmp";
  //run teracopy.exe using command line parameters
  //teracopy.exe [operation] *[list of source files] [target]
  run """%programfiles%\TeraCopy\teracopy.exe" $op *"<xypath>\teracopylist.tmp" "$path\""";
  status TeraCopy: Paste, 84C400, ready;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

Muroph
Posts: 561
Joined: 21 Aug 2007 16:13

Re: TeraCopy Integration

Post by Muroph »

fixed again for xyplorer 7.60.0010.

Cut

Code: Select all

//copy list of items to a variable
  getinfo $items, "SelectedItemsPathNames";
  //save list path
  set $list, "<xypath>\teracopylist.tmp";
  //delete old list
  setkey avoid possible, error, message, "$list";
  delete 0,0, "$list";
  //save operation and list of items
  setkey move, teracopyop, tc, "$list";
  setkey "<crlf>$items", teracopylist, tc, "$list";
  status TeraCopy: Cut, 84C400, ready;
Copy

Code: Select all

//copy list of items to a variable
  getinfo $items, "SelectedItemsPathNames";
  //save list path
  set $list, "<xypath>\teracopylist.tmp";
  //delete old list
  setkey avoid possible, error, message, "$list";
  delete 0,0, "$list";
  //save operation and list of items
  setkey copy, teracopyop, tc, "$list";
  setkey "<crlf>$items", teracopylist, tc, "$list";
  status TeraCopy: Copy, 84C400, ready;
Paste

Code: Select all

//save current path. this will be the target folder
  set $path, "<curpath>";
  //restore operation type
  getkey $op, teracopyop, tc, "<xypath>\teracopylist.tmp";
  //run teracopy.exe using command line parameters
  //teracopy.exe [operation] *[list of source files] [target]
  run """%programfiles%\TeraCopy\teracopy.exe"" $op *""<xypath>\teracopylist.tmp"" ""$path\""";
  status TeraCopy: Paste, 84C400, ready;
My shared scripts:
TeraCopy Integration, Tag Manager, Comments Menu, Text Replacer, Image and Media Tools, Checksum Calculator, Video Calculator
only 5 URLs are allowed on the sig...

Post Reply