problem with move up from search list

Things you’d like to miss in the future...
Forum rules
:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:

: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: We 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.

:info: When attaching an Image, please use the Attachment tab at the bottom of your post and click "Add files".

:warnred20: :warnred20: :warnred20: :warnred20: :warnred20: READ THIS AND DO IT!!! :warnred20: :warnred20: :warnred20: :warnred20: :warnred20:
neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

problem with move up from search list

Post by neutrox »

move up from search results list is moving two levels up, taking the searched folder as original location instead of each file's location as source path to count from and move up.

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: problem with move up from search list

Post by FluxTorpedoe »

Hi'
If I'd read correctly somewhere else in the forums, it seems you've stumbled upon one of "the oldest mysteries of XYplorer"... 8)

A quick fix with this "Power MoveUp": you can use this script to have each of your selected items Move Up accordingly to their own path. Use it as a Custom Button or in your Menu "User | Manage Commands...", etc.

Code: Select all

foreach($myitem, get("SelectedItemsPathNames", "|"), "|") {
    if exists($myitem) {
      $uppath = gettoken(trim($myitem, "\"), -3, "\", , 1);
      moveto($uppath, $myitem);
    }
  }
Hope this helps, :)
Flux

Edit (2014-04-10): Fixed bug occurring with certain names.
Edit (2014-04-13): Double-check to to only move files that haven't already been moved — if exists().
Last edited by FluxTorpedoe on 13 Apr 2014 09:30, edited 3 times in total.

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

Re: problem with move up from search list

Post by admin »

neutrox wrote:move up from search results list is moving two levels up, taking the searched folder as original location instead of each file's location as source path to count from and move up.
When you look at the statusbar when hovering the moveup command you see that this is by design. Improvement in future is not impossible.

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: problem with move up from search list

Post by neutrox »

with due respect i must disagree. 'Improvement in future is not impossible.' assuming this is not due to a technical limitation what i expect from 'move up' is the selected file(s) being jumped up a folder, ie, moved to each respective parent folder regardless being listed on a search.

if i launch a search the sole purpose is batch process the results the way i'd do folder after folder. no reason for it behaving anomalously imho.

not to mention the complete mess the current behavior delivers on occasional name collisions. so please try.

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

Re: problem with move up from search list

Post by admin »

I don't really see the scenario where you would "Move Up" a couple of files located in different and probably nested folders. Why would one want to do that?

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: problem with move up from search list

Post by neutrox »

mainly unzipped contents. users have their own packaging method and can be tiresome going folder after folder just to re-position a one level deeper series of files from a certain person.

branch view is another way to sort stuff out granted 'move up' work respectively to each file and not relative to main folder.

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

Re: problem with move up from search list

Post by admin »

neutrox wrote:mainly unzipped contents. users have their own packaging method and can be tiresome going folder after folder just to re-position a one level deeper series of files from a certain person.

branch view is another way to sort stuff out granted 'move up' work respectively to each file and not relative to main folder.
I could add it for single selections or multiple selections in the same location, but it is not possible for multiple selections in different locations (and I don't think a lot of people would ever use this).

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: problem with move up from search list

Post by FluxTorpedoe »

@neutrox
Did you try the small script I posted?
I too run into this particular need once in a blue moon, so that's why I'd made it.

If you're so concerned about efficiency, right now you're making 2 clicks anyway (one RightClick on your items, then one LeftClick on "Move Up").
So make a CTB or a Catalog entry and you'll get the action in 1 click! Or put it in your "User | Run Script" commands, and it'll be 2 LeftClicks. Or assign a shortcut, etc.

neutrox
Posts: 194
Joined: 05 Mar 2012 15:23

Re: problem with move up from search list

Post by neutrox »

admin: great!

FluxTorpedoe: i already had an script solution. i guess that xyplorer function will perform faster and that's a second reason why i ask this. the first one: 'move up' should only be understood as... move selected files one level up reagrdless where it as called from, not turning sooner or later into an undesirable visitor with unpleasant surprises.

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: problem with move up from search list

Post by kiwichick »

Hi there, I would really love there to be some way around this. I constantly want to do exactly what the OP asked. Do a search (or branch view) and move files up one level relative to their path not the folder being searched.
admin wrote:Why would one want to do that?
My latest (and most common) reason is this scenario:

Folder named Tasks (the folder being searched or branched)
... Clock (subfolder)
... Script (sub-subfolder)
... clock.exe (file to move up one level)
... Dolly
... Script
... dolly1.exe
... dolly2.exe
... Heater
... Script
... heater.exe

So when I search or branch I want to move all of the exe files out of their 'Script' folders and up one level to their respective 'Name' folders. Now, with 400+ plus folders I sure don't want to go to each folder and move the file up one level. So there are very legitimate reasons for wanting this feature.

I tried the script that was posted but it didn't work for me. Pity I didn't test drive it before using it on my 400+ files :-( It moved them up four levels from the 'Folder named Tasks' - a total of 6 levels from where the files started!
Windows 10 Pro 22H2

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

Re: problem with move up from search list

Post by admin »

Code: Select all

v11.70.0111 - 2012-11-11 17:39
    * Move Up: In search results the selected items are now moved to the 
      folder above their current location. Before, they were moved to 
      the folder above the search path -- nobody needs this.
      Note: If the selected items are in different locations, the 
      command is disabled.
Assuming you know the above, what you ask for is not to disable it if the selected items are in different locations?

FluxTorpedoe
Posts: 904
Joined: 05 Oct 2011 13:15

Re: problem with move up from search list

Post by FluxTorpedoe »

@kiwichick
Sorry one of my scripts caused you trouble!!! :(
I gave it a glance & I don't even know how it could have worked for so long here... (I use it regularly for the same purpose as the one you described).
Well, I edited the first post to fix it, tested it, and everything's in order again!
Again, my bad for this disappointing experience...

Hope the new one helps, 8)
Flux
admin wrote:what you ask for is not to disable it if the selected items are in different locations?
Well, this is a use I have too —not that often— but still quite regularly (hence my script). That's what seems logical to expect from a "Move Up" on different files.

nerdweed
Posts: 648
Joined: 25 Feb 2012 07:47

Re: problem with move up from search list

Post by nerdweed »

Moving files from different folders to one folder above the current search path would be quite easy to do manually. I certainly prefer files being moved one folder up of their respective current folder. This is a nice service

P.S. I didn't knew this and thought a move up would move it to a common directory (it does seem logical because most app devs don't bother to see how it will actually add value) and had done all this manually.

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: problem with move up from search list

Post by kiwichick »

admin wrote:

Code: Select all

v11.70.0111 - 2012-11-11 17:39
    * Move Up: In search results the selected items are now moved to the 
      folder above their current location. Before, they were moved to 
      the folder above the search path -- nobody needs this.
      Note: If the selected items are in different locations, the 
      command is disabled.
Sorry, Don, I guess I don't really understand what 'different locations' means. Is that what happened and 'the command was disabled'?

And I should have previewed before posting (I always forget that tabs aren't kept). It should have looked like this:

Folder named Tasks (the folder being searched or branched)
... Clock (subfolder)
......... Script (sub-subfolder)
............... clock.exe (file to move up one level)
... Dolly
......... Script
............... dolly1.exe
............... dolly2.exe
... Heater
......... Script
............... heater.exe

I just want to move the exe files out of their Script folders and up one level to their Name folders. So is that what is meant by 'different locations'?

But FluxTorpedoe's fixed script works perfectly now so I've got it sorted :appl:

Cheers.
Windows 10 Pro 22H2

kiwichick
Posts: 648
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: problem with move up from search list

Post by kiwichick »

FluxTorpedoe wrote:@kiwichick
Hope the new one helps, 8)
Flux
Absolutely fabulous!!! Thanks heaps :biggrin:
Windows 10 Pro 22H2

Post Reply