Page 1 of 1

copyto / on_collision

Posted: 17 Apr 2018 02:02
by armsys

Code: Select all

copyto "D:\Test\", "*C:\ArmSys\XYplorer\Lists\Reading.txt", "D:\Download", 2, 1, 1;
On_Collision set as 1 won't work. The behavior is quite weird. It causes both flags and autorichop ineffective. That's, copyto won't create non-existing folders in destination as expected.

Re: copyto / on_collision

Posted: 17 Apr 2018 02:06
by highend
Without knowing what's inside the source file... Is there any question here?
Btw, you've noticed that bbcode doesn't work inside [code][/code] tags?

Re: copyto / on_collision

Posted: 17 Apr 2018 02:10
by armsys
Hi Highend,
Thanks for your instant reply. I was editing and clarifying my copyto issue.

Re: copyto / on_collision

Posted: 17 Apr 2018 08:54
by highend
Note for copyto/moveto: If you use any of the following parameters from [on_collision] to [show_progress] then the operation is forced to be Custom Copy/Move because Shell Copy/Move does not support these settings. For all non-passed parameters the global user settings are used as specified in Configuration | File Operations | Custom Copy Operations | Configure....
I guess that this means that autorichop gets disabled in that case

@Don
If this is true, can you add a sentence to that paragraph, stating that autorichop will be disabled? I doubt that "forced to be Custom Copy/Move" makes this perfectly clear...

Re: copyto / on_collision

Posted: 17 Apr 2018 10:00
by armsys
I guess that this means that autorichop gets disabled in that case
That's exactly what happened. That's, XYplorer can no longer create non-existing folders.
On the other hand, after dropping the on_collision, XYplorer constantly pops up the annoying Custom Copy / Name Collision dialog, if duplicates are found.

Re: copyto / on_collision

Posted: 17 Apr 2018 10:09
by armsys
My core question about copyto:
How to creating non-existing folders while overwriting if newer (on_collision=1)?

Re: copyto / on_collision

Posted: 17 Apr 2018 10:12
by jupe
This is just an idea, it may not be of no use to you, but you could use backupto() instead and then in the GUI settings set it to always automatically overwrite, and drop the flag from the passed switches.

Configuration | File Operations | Backup

I don't know if this would definitely work, you will have to test it.

Re: copyto / on_collision

Posted: 17 Apr 2018 10:39
by armsys
If switching to backupto:

Code: Select all

  backupto "D:\Test\","*C:\ArmSys\XYplorer\Lists\Reading.txt",1;
it will pop the annoying dialog:

Re: copyto / on_collision

Posted: 21 Apr 2018 10:13
by admin
armsys wrote:

Code: Select all

copyto "D:\Test\", "*C:\ArmSys\XYplorer\Lists\Reading.txt", "D:\Download", 2, 1, 1;
On_Collision set as 1 won't work. The behavior is quite weird. It causes both flags and autorichop ineffective. That's, copyto won't create non-existing folders in destination as expected.
What's inside C:\ArmSys\XYplorer\Lists\Reading.txt?

Re: copyto / on_collision

Posted: 22 Apr 2018 10:35
by armsys
Just a simple list of pdf files.

Code: Select all

C:\Temp\a.pdf
C:\Temp\b.pdf
On Configuration> Custom Copy, I set "On name collisions" to "Overwrite if newer", no more popups.
This is merely a workaround, not a perfect solution. It would be nice to allow script to override the on_collisions default setting (namely, Ask before Overwriting).
Thank for your help anyway.

Re: copyto / on_collision

Posted: 24 Apr 2018 17:11
by admin
Not sure I understand what you want. What would your desired outcome look like?