Results 1 to 3 of 3

Thread: I need a help with a script, music problem.

  1. #1

    I need a help with a script, music problem.

    I had a harddrive die on me, it had 70 gig of music on it. Before it died completely, I was able to copy it to another 80 gig drive althoough with huge number of I/O errors. The contents went form 70 gig to about 50 gig. 20 gigs lost to corruption.

    The problem is that most of the files that made it are good, the ones that are corrupted are random throughout the collection. 50 gig of files to go through and see if each plays will drive me nuts.

    Can anyone think of a script that will test the file if it is playable -- ignore it, if it doesnt play -- delete it?

    I cant seemed to get my head wrapt around this.

    Anyone have any thoughts? (thoughts in perle or bash are good heh)



  2. #2

    Re:I need a help with a script, music problem.

    What happens when you try to play a music file with a command line player, ie mpg321? Do you get an error?

    If you get an error message, you can write a perl script using `backticks`. Backticks are the key that doubles as the ~tilde. Try putting a command in backticks and printing the result.

    print "The result of the command is "
    my $i = `ls`
    print $i

    If you can get an error msg out of a command line player, you can parse the output.

  3. #3

    Re:I need a help with a script, music problem.

    Oops, false alarm ;D I found 2 proggies in apt for just such occasions. checkmp3 and mp3check

    Beyond that;
    I guess I'm not that familliar with command line players. Any boxes I have without a gui, also dont have a sound card (or configured). Xmms simply would not open the files.

    Regardless-- problem solved.



Similar Threads

  1. Bash script problem
    By Schotty in forum Programming
    Replies: 1
    Last Post: 04-20-2007, 01:18 AM
  2. Problem whit Script BASH!!!
    By Pitoniso in forum Windows - General Topics
    Replies: 2
    Last Post: 04-04-2007, 12:13 PM
  3. add machine script (smb) problem
    By amit11381 in forum Redhat / Fedora
    Replies: 0
    Last Post: 07-31-2006, 09:48 AM
  4. MRTG cfgmaker script problem with Fedora
    By cheezetrix in forum Programming
    Replies: 1
    Last Post: 05-13-2004, 06:15 AM
  5. ipchains script problem
    By gman in forum Security
    Replies: 3
    Last Post: 04-23-2002, 03:18 PM


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts