Solved

How to move mp3 files from my server

Posted on 2009-07-10
5
269 Views
Last Modified: 2012-05-07
I want to find and move all the mp3 files from a server volumne.  These files are within many subfolders.  How can I do this? Use DOS - MOVE?  I don't want to COPY, I want them off of the current volume, but don't want to delete them (yet)

Thanks!
0
Comment
Question by:ejcrist
5 Comments
 
LVL 2

Expert Comment

by:DuaneMizell
ID: 24827102
The method I used for a similar task is to use Windows Search to find "*.mp3; *.wma;" (and other music file types if necessary) and sort by folder (so I don't copy any game music or other useless files) and then start selecting (hold ctrl to select multiple files, hold shift to select a series of files) and copy/cut & paste.
0
 
LVL 5

Expert Comment

by:mnialon
ID: 24827121
hello
I don't know how to do it in one command but you can try:
xcopy /s src\*.mp3 dst
del /s src\*.mp3

or maybe you can do it with a power shell command
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 250 total points
ID: 24827487
Paste the script below into a text file with a .cmd extension.  Customize the value of the source variable on line 4 with the location of the directory to search under.  Customize the value of the dest variable on line 5 with the location to move the files to.

Running the script will echo the commands to be run.  Once you have tested it successfully, remove the word ECHO from line 10 to move the files.

The advantage of this script is that it preserves the folder tree so that you know where each file came from and don't have to worry about duplicate names.


@echo off

setlocal
 

set source=\\server\share

set dest=c:\music

set mask=*.mp3
 

for /F "tokens=*" %%G in ('dir "%source%\%mask%" /A:-D /B /S') do (

 if not exist "%dest%%%~pG" md "%dest%%%~pG"

 ECHO move "%%G" "%dest%%%~pG"

)
 

pause

Open in new window

0
 
LVL 8

Expert Comment

by:JT92677
ID: 24830492
The MOVE command automatically deletes the source, so if you don't want to delete the source files, steer clear of the move command.

I personally use a program called Foldermatch to move a large number of files, directories, etc. around. It has so many other features that you might review how you do backups, how to test if files are the same (compare), and how to keep directories from a source location and a target location in sync. It also has duplicate checking.

The key is that it deals with directories and/or files.

At least take a look at it http://foldermatch.com/  I don't have anything to do with the outfit that makes the program but I paid the shareware fee a couple of years ago and never regretted it. I use it for exactly the kind of task you are describing.

You also have the opportunity to review what it will do before it does any moving, copying, etc., something a DOS solution doesn't do well, or at all.

Jeff
0
 

Author Closing Comment

by:ejcrist
ID: 31602263
Thanks a bunch...that worked geat!
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Lets start to have a small explanation what is VAAI(vStorage API for Array Integration ) and what are the benefits using it. VAAI is an API framework in VMware that enable some Storage tasks. It first presented in ESXi 4.1, but only after 5.x sup…
Data center, now-a-days, is referred as the home of all the advanced technologies. In-fact, most of the businesses are now establishing their entire organizational structure around the IT capabilities.
This video teaches viewers how to encrypt an external drive that requires a password to read and edit the drive. All tasks are done in Disk Utility. Plug in the external drive you wish to encrypt: Make sure all previous data on the drive has been …
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now