Solved

How to move mp3 files from my server

Posted on 2009-07-10
5
271 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Ever notice how you can't use a new drive in Windows without having Windows assigning a Disk Signature?  Ever have a signature collision problem (especially with Virtual Machines?)  This article is intended to help you understand what's going on and…
Create your own, high-performance VM backup appliance by installing NAKIVO Backup & Replication directly onto a Synology NAS!
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 tutorial will walk an individual through the process of installing the necessary services and then configuring a Windows Server 2012 system as an iSCSI target. To install the necessary roles, go to Server Manager, and select Add Roles and Featu…

809 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