copyto / on_collision

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

copyto / on_collision

Post by armsys » 17 Apr 2018 02:02

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.
Last edited by armsys on 17 Apr 2018 02:08, edited 3 times in total.

highend
Posts: 8622
Joined: 06 Feb 2011 00:33

Re: copyto / on_collision

Post by highend » 17 Apr 2018 02:06

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?
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Re: copyto / on_collision

Post by armsys » 17 Apr 2018 02:10

Hi Highend,
Thanks for your instant reply. I was editing and clarifying my copyto issue.

highend
Posts: 8622
Joined: 06 Feb 2011 00:33

Re: copyto / on_collision

Post by highend » 17 Apr 2018 08:54

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...
One of my scripts helped you out? Please donate via Paypal or highend (at) web (dot) de

armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Re: copyto / on_collision

Post by armsys » 17 Apr 2018 10:00

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.

armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Re: copyto / on_collision

Post by armsys » 17 Apr 2018 10:09

My core question about copyto:
How to creating non-existing folders while overwriting if newer (on_collision=1)?

jupe
Posts: 1266
Joined: 20 Oct 2017 21:14
Location: 1909 x64

Re: copyto / on_collision

Post by jupe » 17 Apr 2018 10:12

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.

armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Re: copyto / on_collision

Post by armsys » 17 Apr 2018 10:39

If switching to backupto:

Code: Select all

  backupto "D:\Test\","*C:\ArmSys\XYplorer\Lists\Reading.txt",1;
it will pop the annoying dialog:
Attachments
XY01.jpg
XY01.jpg (23.58 KiB) Viewed 690 times

admin
Site Admin
Posts: 48487
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: copyto / on_collision

Post by admin » 21 Apr 2018 10:13

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?

armsys
Posts: 557
Joined: 10 Mar 2012 12:40
Location: Hong Kong

Re: copyto / on_collision

Post by armsys » 22 Apr 2018 10:35

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.

admin
Site Admin
Posts: 48487
Joined: 22 May 2004 16:48
Location: Cologne, Win 8.1, Win 10
Contact:

Re: copyto / on_collision

Post by admin » 24 Apr 2018 17:11

Not sure I understand what you want. What would your desired outcome look like?

Post Reply