Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


eracode

Smpl Mnmlst
9331 posts

Uber Geek
+1 received by user: 6198

ID Verified
Trusted
Lifetime subscriber

#64531 17-Jul-2010 10:26
Send private message

In Win XP I have a heap of folders and I want to copy the contents (mp3 files) of all the folders into one new folder, i.e. without the original folders being in the new folder.

Is there a quick way to do this in one hit without having to open each folder individually, and then copy and paste contents of each folder into the new one?




Sometimes I just sit and think. Other times I just sit.


Create new topic
bvidulich
58 posts

Master Geek


  #352609 17-Jul-2010 11:17
Send private message

You could try doing a search in the parent folder for *.mp3, and then cut and paste the files in the results screen into the new folder.



eracode

Smpl Mnmlst
9331 posts

Uber Geek
+1 received by user: 6198

ID Verified
Trusted
Lifetime subscriber

  #352613 17-Jul-2010 11:24
Send private message

Great thinking - many thanks




Sometimes I just sit and think. Other times I just sit.


freitasm
BDFL - Memuneh
80646 posts

Uber Geek
+1 received by user: 41026

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #352618 17-Jul-2010 11:37
Send private message

Better still you can just open a command prompt and execute this:

FOR /R %%G IN (*.mp3) DO copy "%%G" \temp\destination

Replace the \temp\destination with the folder you want to receive it. Run this from the parent folder for all those folders...






Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 




SepticSceptic
2263 posts

Uber Geek
+1 received by user: 779

Trusted

  #353399 19-Jul-2010 13:57
Send private message

Just had to look that up :-)

"
FOR /R [[drive:]path] %variable IN (set) DO command [command-parameters]

Walks the directory tree rooted at [drive:]path, executing the FOR statement in each directory of the tree. If no directory specification is specified after /R then the current directory is assumed. If set is just a single period (.) character then it will just enumerate the directory tree."

though:

"To use the FOR command in a batch program, specify %%variable instead of %variable. Variable names are case sensitive, so %i is different
from %I."

The way I read it, shouldn't you be using just the one % since you are outside of a batch file ?

http://www.computerhope.com/forhlp.htm#03

freitasm
BDFL - Memuneh
80646 posts

Uber Geek
+1 received by user: 41026

Administrator
ID Verified
Trusted
Geekzone
Lifetime subscriber

  #353400 19-Jul-2010 13:59
Send private message

It makes no difference. At least with the test perfomed before posting the command here.





Referral links: Quic Broadband (free setup code: R587125ERQ6VE) | Samsung | AliExpress | Wise | Sharesies 

 

Support Geekzone by subscribing (browse ads-free), or making a one-off or recurring donation through PressPatron.

 


Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.