News:

Current Full E-Touch Version: 10.2.0
Current Demo E-Touch Version: 10.0.0
Current Beta: 10.2.1 Beta 22 (09/02/23)

Main Menu

Program/Batch File to copy files from subfolder to root folder

Started by eist1, July 09, 2008, 08:06:29 PM

Previous topic - Next topic

eist1

Does anyone know of a program or batch file to move files in a subfolder up to the root folder? I just cleaned up all of my music, but the MP3 Scanner I used put all of the damaged files into a Damaged folder in each album

C:\My Music\ACDC\Back in Black\Damaged\

So what I'm looking to do now is take all of the mp3's that are in the damaged folder and move them back into the root album folder. You would think there is a program out there that you could tell it to look for the Damaged folder, then just copy anything in it up one directory and then remove the damaged folder. I used to be pretty good at batch files, but that was a long time ago... Please let me know if anyone has any ideas, as it will be a pain to do it manually. Thanks

Novalak

you could always use a sync program from one folder to another

one its finished to a search for "Damaged" and delete all the folders?

btw what program did you use to do this check?

leidge

I've made a program for you that will do what you want. Point it at your music root-folder, set the name for the folder to search for and away you go.  It will then move all files from the folder you searched for into the folder one step up, and then delete the folder.


http://home.online.no/~llindga/Programs/MoveFiles.zip

eist1

leidge,

Thanks!! I will try that out ASAP!! This forum is great, I knew someone here would have some idea.

Novalak,

Here's the program I used to separate all of the bad mp3's from the good MP3Test http://www.maf-soft.de/mp3test/ , except don't do what I did and choose to put them in a Damaged folder in the album directory. After did it I saw that you could choose a sepatate directory on the C: drive and keep the file structure, so all you then need to do is separate the good from the bad, fix all of the bad ones in the damaged folder on the C: drive and then just copy the whole damaged folder back into your good music directory and it will put all of the songs back in place. BTW I used AShampoo Music Studio 3.40, and it did a great job on any that were corrupt, but also fixed the songs that were broken and only a few seconds long, so the scanner no longer saw it as bad, so I need to find a DSP scanner to find the short songs and replace those. Let me know if you have any other questions.

Thanks again leidge!

eist1

leidge,

That program worked great!! It only took a little over a minute to move all of the files and delete the damaged folders! Man your first post and already making a contribution to the forum :beer Would you be interested in helping out with some of the programming for the jukebox? Barry is always looking for programmers to jump in and work on areas he has no time for (ie config program, skins, website) But there are other areas that people have requested that Barry has said no to due to him not having time. It would be nice to have an app that would rip CD's and place them in the music directory and also tagging/editing tags, and possibly as a bonus being able to scan mp3's for errors. This could be a Tools section in the Jukebox options. I know Touchtrax has has/or has added the ability to Rip CD's and edit ID3 info (you can see screenshots on their site), There are many command line programs out there that do these functions, so maybe all that is needed is make a GUI frontend that combines these functions. I wouldn't know, I'm not a programmer  ;D Well thanks again and welcome to the forum...

BigLa

That's an awesome program to whip up so quickly. I spent about an hour at work trying to write a batch job that would do this, but I was ultimately unsuccessful. Damn programmers!   :)

leidge

Glad to help eist1.  Thanks for the great skins by the way  ;D

At the time I saw the post, the first thing that struck me was that the easiest way to do it was to write the program.
It could have been done by using batch. So just to see if I could write such a batch I did some searching and came up with this site http://www.daniweb.com/forums/thread61479.html.  From that it was quite easy to get the following :

Set MyCurDir=%CD%
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S damaged') DO (
cd "%%G"
move *.* ..\
cd "%MyCurDir%"
RMDIR "%%G")


Thought it might be helpful for some for later use.
BigLa,  hope this doesn't make me look like an ass.  At least it's not my intention. :P


Barcrest

Nice code and nice bat file there, what did you code the app in?
Keep on Rocking in the Free World \m/ ;D\m/



Jukebox Stats...

BigLa

Leidge,
          I'm actually pretty happy you posted that batch code. After my failure, I was very curious as to how this would be done. Now having looked at your code, I'm quite certain I never would have succeeded.  :)