Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to move mp3 files from my server

Posted on 2009-07-10
5
Medium Priority
?
280 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Moving your enterprise fax infrastructure from in-house fax machines and servers to the cloud makes sense — from both an efficiency and productivity standpoint. But does migrating to a cloud fax solution mean you will no longer be able to send or re…
Many businesses neglect disaster recovery and treat it as an after-thought. I can tell you first hand that data will be lost, hard drives die, servers will be hacked, and careless (or malicious) employees can ruin your data.
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…
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

636 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