?
Solved

How to move mp3 files from my server

Posted on 2009-07-10
5
Medium Priority
?
278 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The question appears often enough, how do I transfer my data from my old server to the new server while preserving file shares, share permissions, and NTFS permisions.  Here are my tips for handling such a transfer.
Is your phone running out of space to hold pictures?  This article will show you quick tips on how to solve this problem.
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

765 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