Redo Operations - 0.2.0 (March 03, 2017)

Very neat script! I love the example gif.

This was a great idea! Thank you for sharing :thumbsup:

And I'm glad that people liked it!

I initially had at least seven screenshots to explain what this script really does but then realized that a single "video" will take care of all that haha.

Hi, I love your script ! Thank you !

  1. One request please ! your script work perfectly on Hardisc etc... but when i try to use it on a network drive (Smb drive (for my Synology server), it's only remember the root of the drive, and not the full path to the folder used.
    so for example i move a file to S:/Pictures, and the path remembered is S:/, not S:/Pictures.
    is it possible to add this feature ? Thanks :slight_smile:.

  2. got an error from Directory opus :

- - - - - - - ->
Chrome "https://encrypted.google.com/search?as_q="
<- - - - - - - -
 28/01/2017 15:00 Redo Operation:  Erreur à la ligne 73, position 59 (Error line 73, position 59)
 28/01/2017 15:00 Redo Operation:  Indice en dehors de la plage (0x800a0009) (Out of range)

#1 Ok! Just to confirm though, it's UNC path isn't it? So it should be \\ServerName\Path\to\Folder? Or you meant that you mounted the network drive to a drive letter like S:\? Because in both cases, it should work.

#2 Ooh that's weird. I don't know why there's a google search term in there and also not sure why there's an out of range error since that should have been taken care of in the script. Please do the following:

  1. Turn on the Debug setting in Settings > Toolbars > Script > Click on Redo Operation > Change Debug from False to True.
  2. Display the Script Logs by Help > Logs > Script Log.
  3. Do a copy and a move operation
  4. Save the log and send it to me.

After that, clear your Redo Operations History and try to reproduce the error you had with #2 and send the log to me again. And finally, clear your Redo Operation History again and do a copy and move operations to your network drive and then send me that log for that too. So there should be three log files total.

By the way, it may take me a few days since I'm busy so try to use it on Harddisk for now until I fix the error and check why #1 did not work.

Hi ! yes, it's a network drive mounted, but the address path is as well \\**\**
i can give you some example, but i confirm this.

ok i will do the #2 and will come back here as soon as it's done (French time, 10p.m, Rzzzzzzzzz :wink: )

no problem i'll try my best ! :slight_smile:.

i sent the link to Logs / screen captures by PM !

:slight_smile:.

So I looked through the code and attempted to mount a network location to a drive letter. I then used this code:

function OnGetCopyQueueName(GetCopyQueueNameData)
{
	var ReOps_dest = GetCopyQueueNameData.dest;
	var ReOps_move = GetCopyQueueNameData.move;

	if (Script.config["Debug"] == true) {
		DOpus.ClearOutput
		ReOpsInitialize()
		Log("Redo Operation (Debug)")
		Log("  Redo Operation GetCopyQueueNameData.dest: " +GetCopyQueueNameData.dest)
		Log("  Redo Operation DOpus.listers(0).activetab.path: " +DOpus.listers(0).activetab.path) // DOpus.Lister.activetab.path does not work?
		if (String(DOpus.listers(0).activetab.path) == String(GetCopyQueueNameData.dest)) {
			Log("  Redo Operation: GetCopyQueueNameData.dest and DOpus.listers(0).activetab.path Matches")
		}
		else {
			Log("  Redo Operation: GetCopyQueueNameData.dest and DOpus.listers(0).activetab.path Does Not Match")
		}
	}
.
.
.
}

and the results were:

 1/30/2017 7:25 PM Redo Operation:  Redo Operation (Debug)
 1/30/2017 7:25 PM Redo Operation:    Redo Operation GetCopyQueueNameData.dest: Z:\
 1/30/2017 7:25 PM Redo Operation:    Redo Operation DOpus.listers(0).activetab.path: Z:\Documents
 1/30/2017 7:25 PM Redo Operation:    Redo Operation: GetCopyQueueNameData.dest and DOpus.listers(0).activetab.path Does Not Match

The results totally matched up if it's on local drives and network paths (UNC format) but once I mounted the server path to a drive letter, Z in this case, it does not work. OnGetCopyQueueName's destination only stored the root of the path contrary to the entire path when the destination is local or a UNC path.

In the mean time, please test out this work around and see how it works for you.
Updated script below is unnecessary. The problem has been fixed now with the new DOpus beta 12.3.4.
Redo_Operation.js.txt (10.0 KB)

So according to Jon here:

It's actually a bug. So it should be fixed in the next update. So martyprod, it's better to wait till the new version of DOpus comes out and use the script again. The workaround I had earlier worked only if you manually got to a tab and then paste a copied/move file/folder into it. So it's definitely not idea. Once the fix for DOpus is out, my initial version of the script should work perfectly.

Thanks Jon!

New beta version DOpus 12.3.4 has fixed the problem.

I confirm the bug has been fixed (wow, a bit lost with the new forum, i received only a notification of the topic today, missed your previous messages :slight_smile: ).

Thanks for the fix :slight_smile: it's working great :slight_smile: !

one suggestion, or maybe it can be done in DO : is there a possibility to have the list of the
Copy / Move link as a right mouse click option ?
For example, i right click on a picture, and there is a list of the copy / move history links instead of using a keyboard workshop or clicking on the button ?

Yes it can! I just learned more about this feature (well I known about it for a while but haven't used it since it's a feature that I use more heavily in XYplorer where I already have it all setup). So to set it up:

  1. Settings > File Types...

RedoOperation LISTCOPY 1
RedoOperation LISTMOVE 1

Finally!

2 Likes

Ahh you're amazing !! Thanks, and I even learned something in DO :slight_smile: thank you !

The code doesn't work here. All i get, is a path i am actually in, but not, where the recent copy was made to, the destination path. What am i doing wrong?

I don't know what you did wrong sorry, but it's working here. I followed the instruction to install it, not easy at first, my directory opus is set up in French,but after i found the right windows and translation, it's pretty easy to do.

Hello! Just double checking but you're using version 0.1.0 and not the one that I made as a workaround, correct? Oh, as I typed this, I realized what may be the problem. Preferences > File Operations/Copy Options > Automatically manage file copy queues option must be turned on for it to work.

New version 0.2 is out

Added the Universal option. Instead of having a separate individual list for recent COPY and MOVE operations, they all share the same list now. Therefore you can COPY a file/folder to a location where you recently had moved files/folder to and vice versa. Off by default (turn it On in the script's Options). I may actually have it On by default in the future as I find this may be the best way of handling it because what if you moved several files to destination X:\ but then you decided to only copy the remaining files to the same location?

1 Like

Would it be possible as add a dynamic list option so that the context option lists the X number of folders rather than have to press redo move or redo copy first?

This script will save me so much time!

1 Like

I agree ! i stopped using it because of that !

Oh, sorry! I haven't touched this script for a long time since it does what I needed. I could definitely add in that feature but it may take a while since I'm not really good at programming and will take time to refresh myself on JScript to continue working on this. On the other hand, looking at this thread:

It looks like @Jon and @Leo and co are going to add that feature natively into DOpus? Unless I'm wrong...

Oh. After re-reading it again, I think I read it wrong. What you are asking if the list of Recent Folders can by dynamically listed in the context menu, right? If that's the case, at the moment it's not possible. I believed I asked if it's possible to do this through scripting before. I will have to wait till Jon and Leo make it possible before I can take a look at my script again.

2 Likes