Page 1 of 1

Ghost (folder) selection

Posted: 18 Apr 2023 14:56
by avivariba
I created a custom WinRAR button to create a ZIP (or RAR, but I have ZIP as default profile within WinRAR):

Code: Select all

openwith """C:\Program Files\WinRAR\WinRAR.exe"" a -r -ep1 ""<date yyyy-mm-dd hh-nn-ss>"""
It works when having a single or just a couple of files selected, but when having more files selected it sometimes, out of nowhere, includes an unselected folder and its contents (x032 in this screen capture, being included from the third time forth):
why-is-that-folder-there.gif

Re: Ghost (folder) selection

Posted: 18 Apr 2023 22:35
by admin
Ask WinRAR?

Re: Ghost (folder) selection

Posted: 18 Apr 2023 22:48
by jupe
Provide the filenames to the 3rd param of openwith, that should mitigate it.

Code: Select all

openwith """C:\Program Files\WinRAR\WinRAR.exe"" a -r -ep1 ""<date yyyy-mm-dd hh-nn-ss>""",, <selitems |>;

Re: Ghost (folder) selection

Posted: 18 Apr 2023 22:57
by avivariba
jupe wrote: 18 Apr 2023 22:48 Provide the filenames to the 3rd param of openwith, that should mitigate it.

Code: Select all

openwith """C:\Program Files\WinRAR\WinRAR.exe"" a -r -ep1 ""<date yyyy-mm-dd hh-nn-ss>""",, <selitems |>;
No luck, still includes it. It's also just that one folder, regardless of its name.
admin wrote: 18 Apr 2023 22:35Ask WinRAR?
When done through Windows Explorer (and Command Prompt or Powershell) or through the Context Menu or in WinRAR directly, it doesn't include it. WinRAR in this case should only have access to the selected files, no? Which somehow includes that one folder, so I would assume XYplorer provides it.

Re: Ghost (folder) selection

Posted: 18 Apr 2023 23:10
by highend
So text <selitems |>; reports that folder as selected (when Winrar would include it in the archive)?

Re: Ghost (folder) selection

Posted: 19 Apr 2023 00:04
by avivariba
highend wrote: 18 Apr 2023 23:10 So text <selitems |>; reports that folder as selected (when Winrar would include it in the archive)?
msg <selitems |>; included the folder's files indeed. I might be doing something wrong but text <selitems |>; doesn't seem to do anything for me.

But I just created a new folder, moved the contents from x032 over to that, deleted x032, and now it all works as expected (the original code even) without me being able to recreate it. :veryconfused:

EDIT: The only thing I can think of is that maybe there were hidden files within the folder that got included through WinRAR's recursion (-r) switch and somehow those being included through XY while not through any other method. That would explain why copy-pasting the entire directory for the testing/recording did cause it to happen as well, and why moving over the contents alone did not (with it also happening at different times in different list/thumbnail views and with different selections within XY as well).