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 »

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: 13274
Joined: 06 Feb 2011 00:33

Re: copyto / on_collision

Post 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?
One of my scripts helped you out? Please donate via Paypal

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

Re: copyto / on_collision

Post by armsys »

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

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

Re: copyto / on_collision

Post 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...
One of my scripts helped you out? Please donate via Paypal

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

Re: copyto / on_collision

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

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

Re: copyto / on_collision

Post by armsys »

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

jupe
Posts: 2758
Joined: 20 Oct 2017 21:14
Location: Win10 22H2 120dpi

Re: copyto / on_collision

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

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

Re: copyto / on_collision

Post 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:
Attachments
XY01.jpg
XY01.jpg (23.58 KiB) Viewed 2512 times

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

Re: copyto / on_collision

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

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

Re: copyto / on_collision

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

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

Re: copyto / on_collision

Post by admin »

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

Post Reply