Renaming folder to existing merges contents

Things you’d like to miss in the future...
Forum rules
You might want to read this if you're looking for priority service

:info: Please Include The Following Information
1) Your XYplorer Version (e.g., v28.00.0801)
2) Your Windows Version (e.g., Win 11)
3) Your Screen Scaling Percentage (e.g., 125%).

:info: Use Your Profile Or Signature
We strongly recommend adding your Windows Version and Screen Scaling Percentage to the Location field in your Profile or to your Signature. That way, you only have to type them once, and we won't have to search for that vital information.

:info: How To Attach Images
When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".
tedy
Posts: 323
Joined: 17 Jun 2009 21:48

Renaming folder to existing merges contents

Post by tedy »

I'm not sure if this is something intended. I didn't find anything in options. "Allow move on rename" might have had something to do, but it's the same whether it's on or off.

When renaming a folder to a name of an already existing folder, the contents is moved to the existing folder and the folder being renamed is deleted. I'd rather get a name collision error dialog, at least that's what I expect. This behavior - moving all the contents to the existing folder on such a (human) mistake is plain unacceptable.
E.g.
Having this structure:
c:\test1\test1.txt
c:\test2\test2.txt
c:\test2\subtest2\subtest2.txt

trying to rename test2 folder and if I try to rename it (by mistake (or not?!)) to test1, I get test2.txt and subtest2\subtest2.txt folder/files moved to c:\test1\ and the c:\test2 folder is deleted.

Using Custom copy.

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

Re: Renaming folder to existing merges contents

Post by admin »

I tried your example and got the following prompt by Windows:
MergePrompt.png
Didn't you?
To see the attached files, you need to log into the forum.

Leito
Posts: 562
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Renaming folder to existing merges contents

Post by Leito »

I don't have any confirmation dialog as well. I don't see which option (XY or Windows) could change this behavior...

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

Re: Renaming folder to existing merges contents

Post by admin »

I also get it with a fresh instance. There is no way around it.

Is it maybe Win10?

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Renaming folder to existing merges contents

Post by highend »

No, same behavior on Server 2012 R2 (Win 8.1). Didn't try fresh...
One of my scripts helped you out? Please donate via Paypal

Leito
Posts: 562
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Renaming folder to existing merges contents

Post by Leito »

I'm getting this warning when doing the same renaming from Windows Explorer (on Windows 10 1809):

Image
It doesn't look like your screenshot Don. Which Windows 10 version are you running? edit: oops just saw you're not using Windows 10.

Do you get the same confirmation dialog when renaming from XYplorer and from Windows Explorer?
highend wrote: ↑07 Nov 2018 11:16 No, same behavior on Server 2012 R2 (Win 8.1). Didn't try fresh...
"Same behavior" = ? You're also getting the confirmation dialog?
Last edited by Leito on 07 Nov 2018 11:20, edited 1 time in total.

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

Re: Renaming folder to existing merges contents

Post by admin »

Just another screenshot to make sure we are doing the same thing:
To see the attached files, you need to log into the forum.

highend
Posts: 15016
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Renaming folder to existing merges contents

Post by highend »

"Same behavior" = ? You're also getting the confirmation dialog?
No, it was a comment on Dons assumption that this may be a Win 10 only problem
One of my scripts helped you out? Please donate via Paypal

Leito
Posts: 562
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Renaming folder to existing merges contents

Post by Leito »

Yep:

Image

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

Re: Renaming folder to existing merges contents

Post by admin »

Well, no idea why this not working as it should, ask Windows.

But, of course, it's really bad when this happens out of a mistake. So, I will do something...

tedy
Posts: 323
Joined: 17 Jun 2009 21:48

Re: Renaming folder to existing merges contents

Post by tedy »

I'm on Windows 2016.
As I see it, the wrong behavior is seen on Win10/2016 and not on Don's Win8 (I presume).
This is dangerous behavior. Once files have been moved to the other location there might be no way to tell which files were moved so we can restore the original folder (which has been deleted).

In Windows Explorer I also get the normal collision warning dialog.

But.. when renaming inside of XY, isn't XY that checks for existing folder before actually renaming it? And it deliberately starts moving operations from the renamed folder to the existing folder..

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

Re: Renaming folder to existing merges contents

Post by admin »

This definitely worked before Win10. And on earlier versions of Win8.1 (and it still works here on my uptodate Win8.1).

But I learned not to rely on Windows. So I will remove the whole thing. No more merging via rename.

tedy
Posts: 323
Joined: 17 Jun 2009 21:48

Re: Renaming folder to existing merges contents

Post by tedy »

Wait, you will remove what? :)
I guess you will add custom check when renaming folders...
Renaming files works fine though, even in XY.

Leito
Posts: 562
Joined: 26 Sep 2016 15:37
Location: Windows 10 1809 x64

Re: Renaming folder to existing merges contents

Post by Leito »

admin wrote: ↑07 Nov 2018 11:43 No more merging via rename.
Nooooooo :mrgreen:

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

Re: Renaming folder to existing merges contents

Post by admin »

LOL. I think I found a better solution...

Post Reply