Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Copy or move wildcard foloders up to root.  (Read 2872 times)

0 Members and 1 Guest are viewing this topic.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Copy or move wildcard foloders up to root.
« on: January 17, 2017, 05:52:56 PM »
On my PC I have downloaded a bunch of MP3 files during the past year. Sad to say, I am a poor organizer. I don't always save the files in the save place or move them to the same place. I forget things.

The folders always have this pattern:

Code: [Select]
w*2016????.mp3
Yes, that is for a folder. Yes, the folders have MP3 files.

My problem is to find the 12 folders and put them in one place. After that,I might delete the duplicates. Yes, I made duplicates when I could not remember where I put something.
This should be easy, I can not remember how to move a folder to a toot potion when it could be anywhere in the tree  of a volume.
Hondo you dot hat?
In brief, I want to find the folders that match pattern and move them to the roof the volume. If a folder of the same name is already in the root, skip and do thenext thing..
Later I will delete the duplicates.
Thanks for reading this.   

 

Allan

  • Moderator

  • Mastermind
  • Thanked: 1260
  • Experience: Guru
  • OS: Windows 10
Re: Copy or move wildcard foloders up to root.
« Reply #1 on: January 18, 2017, 05:28:17 AM »
For the umpteenth time - if you are going to use speech to text, PROOFREAD YOUR POSTS. You're asking for help and making it difficult for anyone to understand what you are asking.

Geek-9pm

    Topic Starter

    Mastermind
  • Geek After Dark
  • Thanked: 1026
    • Gekk9pm bnlog
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Copy or move wildcard foloders up to root.
« Reply #2 on: January 18, 2017, 11:56:00 AM »
OK, Try again. Simple code below:

Code: [Select]
XCOPY /S xw*2016????.mp3 J:The above will copy all folders taht match to the J: drive and include the contents of the folders.
But some folders will still be inside other folders. I need all of the matching folders to be now at the top level. How else can I say it?  ???


DaveLembke



    Sage
  • Thanked: 662
  • Certifications: List
  • Computer: Specs
  • Experience: Expert
  • OS: Windows 10
Re: Copy or move wildcard foloders up to root.
« Reply #3 on: January 28, 2017, 08:12:09 AM »
Quote
The above will copy all folders taht match to the J: drive and include the contents of the folders.
But some folders will still be inside other folders. I need all of the matching folders to be now at the top level. How else can I say it?

Reading this, I am thinking your looking to Collapse the tree then so if you had the following:

Code: [Select]
J:\data\1
J:\data\2
J:\data\3\4\5\6

That you would end up with:

Code: [Select]
J:\1
J:\2
J:\3
J:\4
J:\5
J:\6

?

First of all I am pretty sure it wouldnt be able to be all done on same drive due to cyclic error issue. All data would need to be moved elsewhere and then brought back to J: I believe. Drawing a blank on best method to collapse the tree. Its really easy to just grab all files and throw them into root of J:, but if you have files with same file names that will be a problem.

You only want it to be folders 1 level deep then as I showed above or am i not getting what your trying to do?

 :-\