Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Generic User Avatar

Move all files in sub-folders top folder?


  • Please log in to reply
7 replies to this topic

#1 aspfun

aspfun

  •  Avatar image
  • Members
  • 254 posts
  • OFFLINE
  •  
  • Local time:08:21 AM

Posted 16 August 2024 - 12:39 PM

How to move all files in sub-folders to top folder?
For example, there are many files store in the sub-folders:
D:\a\b\\g
How to move all files to D:\a?

Sub folders are a,b,c,d,e,f,g

If file's name is the same, just overwrite.


Edited by hamluis, 16 August 2024 - 01:13 PM.
Merged 3 posts - Hamluis.


BC AdBot (Login to Remove)

 


#2 ranchhand_

ranchhand_

  •  Avatar image
  • Members
  • 5,449 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Midwest
  • Local time:07:21 AM

Posted 16 August 2024 - 01:53 PM

IOW, you want all the files in only one (1) folder, which is "a", correct?

 

Easy. Just enter each folder, one by one (b-g).

In each folder, hi-light the first file, hold down shift and click on the last file in the list. 

R-click anywhere in the list, choose copy.

Now R-click on the A folder, Paste.

If there are identical file names, Windows will ask you if you want to overwrite the existing file, select "yes".

 

Do that for all folders b-g. When all are complete, just delete folders b-g and now you have only one folder (a) with all your files in it.


If there are no responses to my post for 3 days I remove it from my answer list. If you wish to continue the thread after 3 days please PM me.


#3 aspfun

aspfun
  • Topic Starter

  •  Avatar image
  • Members
  • 254 posts
  • OFFLINE
  •  
  • Local time:08:21 AM

Posted 16 August 2024 - 02:38 PM

Yes, to drive a.
It will take a lot of time.

#4 wee-eddie

wee-eddie

  •  Avatar image
  • Members
  • 4,182 posts
  • ONLINE
  •  
  • Gender:Male
  • Location:Ayr, Scotland
  • Local time:01:21 PM

Posted 16 August 2024 - 03:15 PM

You should also remember that even though 2 files might have identical names, that doesn't mean they are the same. So you'll have to compare them before you delete one



#5 Budapest

Budapest

    Bleepin' Cynic


  •  Avatar image
  • Moderator
  • 28,096 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:11:21 PM

Posted 16 August 2024 - 10:58 PM

See a possible solution here:

 

https://answers.microsoft.com/en-us/windows/forum/all/copy-multiple-files-from-subfolders-to-single/60375efe-426b-42b8-8048-30a7d94847c6


The power of accurate observation is commonly called cynicism by those who haven't got it.

—George Bernard Shaw

#6 ranchhand_

ranchhand_

  •  Avatar image
  • Members
  • 5,449 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Midwest
  • Local time:07:21 AM

Posted 17 August 2024 - 08:37 AM

 

It will take a lot of time.

Why? How much time does it take to select and copy?  With the time you have spent already on this in BC, you could have had it done by now.

Did you read my post carefully?  You can select and copy all the files in each folder at the same time, not just each file by itself.


Edited by ranchhand_, 17 August 2024 - 03:31 PM.

If there are no responses to my post for 3 days I remove it from my answer list. If you wish to continue the thread after 3 days please PM me.


#7 ctigga

ctigga

  •  Avatar image
  • Members
  • 222 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:09:21 AM

Posted 17 August 2024 - 03:52 PM

Using the FOR command (as referenced by Bleepin' Cynic) should work.

One optimization: instead of using the COPY command, use the MOVE command instead.

(Since you're moving files within the same file system, MOVE is faster because it only has to update athe location of each file -- vs. updating the location AND creating another copy of each file's data)



#8 aspfun

aspfun
  • Topic Starter

  •  Avatar image
  • Members
  • 254 posts
  • OFFLINE
  •  
  • Local time:08:21 AM

Posted 19 August 2024 - 05:46 AM

I use way1 from this link

https://www.minitool.com/news/move-files-from-subfolders-to-main-folder.html




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users