Apply For...do command ??

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ceesvb
Posts: 3
Joined: 08 Nov 2016 06:19

Apply For...do command ??

#1 Post by ceesvb » 08 Nov 2016 08:28

Hi,
I have on my laptop a collection of MP3 files in multiple folders and want a selection from it (including the folders!) copied to an USB stick, to be played in the car.
I already figured that I for example can mark certain numbers as read-only, and then exclude these numbers from copying.
Or exclude files with the name of the artist or a string in this name.
In any case I myself did not succeed using Xcopy.
Perhaps with FOR ... DO Copy ?? what syntax to be used??

Compo
Posts: 599
Joined: 21 Mar 2014 08:50

Re: Apply For...do command ??

#2 Post by Compo » 08 Nov 2016 10:50

Why don't you provide use with the directory/file structure and the attempts you have made so far to achieve you goal? (ensuring that you goal is fully understandable).

ceesvb
Posts: 3
Joined: 08 Nov 2016 06:19

Re: Apply For...do command ??

#3 Post by ceesvb » 08 Nov 2016 12:06

The mp3-files (att) are stored in submaps 1,..2 en ..3 (att).
All files are to be transferred to an usb-stick including the respective directories, except those of one or more singers whose numbers do not have to be copied.
On my radio I can first choose the wanted SubMap and then travel through the files.
With excuses because of my language being not my native.
Attachments
Schermafdruk 2016-11-08 18.33.05.png
Schermafdruk 2016-11-08 18.33.05.png (44.99 KiB) Viewed 4427 times
Schermafdruk 2016-11-08 18.55.55.png
Schermafdruk 2016-11-08 18.55.55.png (78.3 KiB) Viewed 4427 times
Last edited by ceesvb on 08 Nov 2016 14:53, edited 1 time in total.

miskox
Posts: 553
Joined: 28 Jun 2010 03:46

Re: Apply For...do command ??

#4 Post by miskox » 08 Nov 2016 13:28

Until someone provides a solution this is what you can do:

1. copy all files to USB stick
2. on USB stick: delete files you don't need

Saso

aGerman
Expert
Posts: 4654
Joined: 22 Jan 2010 18:01
Location: Germany

Re: Apply For...do command ??

#5 Post by aGerman » 08 Nov 2016 14:14

Execute ROBOCOPY /? and see what its option /XF is for.

Steffen

ceesvb
Posts: 3
Joined: 08 Nov 2016 06:19

Re: Apply For...do command ??

#6 Post by ceesvb » 10 Nov 2016 10:28

Hi Steffen,
Found "https://technet.microsoft.com/en-us/library/cc733145(v=ws.11).aspx" and your suggestion worked for me :D .
Thx a lot.

Post Reply