Search result - Move folders instead of file


  1. Posts : 140
    Windows 10
       #1

    Search result - Move folders instead of file


    I have done a search for all files with the word e.g. "dvd" in the filename..

    It returns a list of files result..

    The problems is

    I want to move the folder/s that contains those files not just the file on it's own..

    How can I do this?
      My Computer


  2. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #2

    Hi, using file explorer search for something like this is complicated. Just consider the search results you may get. These may include:
    1. folders whose name includes dvd
    2. files whose name includes dvd
    3. files whose pathname includes dvd
    4. If indexed and content indexing is enabled, you will get text files whose content contains dvd

    You can improve this greatly (fewer results) by specifying
    file:dvd
    as your search string, but even then, obscurely, you also get folders whose name contains dvd.

    So.. try Ultrasearch (free) or one of the other similar tools (Locate32, Everything by Void Tools.

    Simply search for dvd and you get just the files whose name contains dvd.
    Now organise the results by path
    Now one by one, right click one file from each location, and click save path to clipboard
    Paste that into e.g. Notepad.

    Now, with a little editing, you have a list of all the folders you need to copy.

    Sorry, can't think of anything more clever than that offhand, but it vastly improves the search.
      My Computers


  3. Posts : 140
    Windows 10
    Thread Starter
       #3

    dalchina said:
    Hi, using file explorer search for something like this is complicated. Just consider the search results you may get. These may include:
    1. folders whose name includes dvd
    2. files whose name includes dvd
    3. files whose pathname includes dvd
    4. If indexed and content indexing is enabled, you will get text files whose content contains dvd

    You can improve this greatly (fewer results) by specifying
    file:dvd
    as your search string, but even then, obscurely, you also get folders whose name contains dvd.

    So.. try Ultrasearch (free) or one of the other similar tools (Locate32, Everything by Void Tools.

    Simply search for dvd and you get just the files whose name contains dvd.
    Now organise the results by path
    Now one by one, right click one file from each location, and click save path to clipboard
    Paste that into e.g. Notepad.

    Now, with a little editing, you have a list of all the folders you need to copy.

    Sorry, can't think of anything more clever than that offhand, but it vastly improves the search.
    Sorry if you are not understanding the problem...

    I search for files with the word "dvd" in it..
    I get file results with word dvd in it..

    e.g. Movie1Dvd.mkv etc..

    But those files are actually in individual folders...

    If I select all the files in search results > cut and paste..into another folder
    the result will be one folder with many files..

    I do not want this..
    I want to cut/move all the files with their parent folder into the new location..
      My Computer


  4. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #4

    I understood that. I'm sorry you didn't understand my answer and suggestion.

    Beyond that, you'd need to do sthg like write a script in Autohotkey.
      My Computers


  5. Posts : 140
    Windows 10
    Thread Starter
       #5

    dalchina said:
    I understood that. I'm sorry you didn't understand my answer and suggestion.

    Beyond that, you'd need to do sthg like write a script in Autohotkey.
    I am looking for a solution that is quick and easy and allows me to move the folders with the files found..

    I don't think your solution would meet this criteria..and seems to be as much work as opening each file location and just move the parent folder individually..

    But thanks for the suggestion/input..
      My Computer


  6. Posts : 42,634
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    I understand- maybe some 3rd party tool.

    I also think there may be a way with Powershell - I'll post this just as a clue as to where you might look.
    Windows PowerShell Tip: Fun Things You Can Do With the Get-ChildItem Cmdlet

    Another example:
    windows 7 - Find all folders with specific files in them? - Super User
    You might be able to solve your problem using PowerShell. I am not home at the moment and have no access to PowerShell, so I can check this solution inspired by this page at a later time only.
    dir -recurse | ?{$_.name -match “^*.ini$”} | sort name | ft directory
    I can check up on the correctness of the answer later.

    Last edited by dalchina; 18 Dec 2016 at 04:46.
      My Computers


  7. Posts : 140
    Windows 10
    Thread Starter
       #7

    dalchina said:
    I understand- maybe some 3rd party tool.

    I also think there may be a way with Powershell - I'll post this just as a clue as to where you might look.
    Windows PowerShell Tip: Fun Things You Can Do With the Get-ChildItem Cmdlet

    Another example:
    windows 7 - Find all folders with specific files in them? - Super User
    You might be able to solve your problem using PowerShell. I am not home at the moment and have no access to PowerShell, so I can check this solution inspired by this page at a later time only.
    dir -recurse | ?{$_.name -match “^*.ini$”} | sort name | ft directory
    I can check up on the correctness of the answer later.

    Thanks for posting the powershell link / script
    This is quite helpful...

    After reading those threads and doing some further research and making a few modifications

    I was able to find a solution to this problem...
    And it is somewhat quick and easy

    I will still keep this thread unsolved, in case:

    -someone found a third party software that solves this problem
    -someone creates an autohotkey script that solves this problem
    -Microsoft solves this problem with a windows update.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 00:17.
Find Us




Windows 10 Forums