Looking for a Program to perform a file copy/move task

dnuggett

Diamond Member
Sep 13, 2003
6,703
0
76
Ok so here is what I'm looking to do. I have a prog that will allow me to copy an audio stream and record to mp3. With the program's settings I point the record stream to a folder let's say c:/ProgramName/RecordedStreams. So what I'd like to do is then automatically send a copy of that mp3 file to my mp3 player once it hits that folder. Ideally this would be automated. Any ideas?

I'd prefer if the file were not just moved to the player. I'd like a copy sent.
 

dnuggett

Diamond Member
Sep 13, 2003
6,703
0
76
Originally posted by: 0roo0roo
audacity is free...for recording. thats all.

I'm not sure what relevance this had to my post? I don't need audacity... unless you are saying it will do what I am asking it to.
 

sunase

Senior member
Nov 28, 2002
551
0
0
This is pretty trivial to script if know anything like Perl or Ruby. Here's a basic example since I'm bored and it's the weekend. This assumes the files only show up when done (otherwise you have to check modification date or file size each time and only copy when done changing or something) and that the MP3 player is accessible as a drive when plugged in:
 

homercles337

Diamond Member
Dec 29, 2004
6,340
3
71
Originally posted by: sunase
This is pretty trivial to script if know anything like Perl or Ruby. Here's a basic example since I'm bored and it's the weekend. This assumes the files only show up when done (otherwise you have to check modification date or file size each time and only copy when done changing or something) and that the MP3 player is accessible as a drive when plugged in:

OT, but what is Ruby traditionally used for? Seems like it could be useful scripting lang. I would still rather use Matlab though.
 

sunase

Senior member
Nov 28, 2002
551
0
0
The popular thing right now is writing websites using Ruby on Rails (a framework for writing web applications that has model-view-controller separation, templating, object-relational mapping to the database, etc. all designed with an eye towards agile development practices). It is supposed to be more concise than the Java options (my preferred language there with frameworks like Struts) and thus has advantages re maintenance, coding time, making alterations, etc..

I do have a Rails website I'm writing just for my own education, but I mostly use Ruby for system utility tasks. Putting logos on images a certain way, searching for duplicate files, spidering websites, altering large numbers of database values, running a set of IO benchmarks after tweaking a server setup, running some stats programs and XSL transforms on the output to generate a certain web page, etc..

Personally, I'd look at Perl before Ruby for that unless you are interested in Rails or like strong object-oriented programming support (the reason I'm using Ruby instead of Perl lately). Amusingly, however, the above code is a bad example of OOP since the most common way to work with files in Ruby uses a lot of class methods instead of objects and instance methods. I tend to write everything very procedural anyway, and only break things into objects when the logic starts getting too complex or I want to access the code from different programs without copying and pasting a lot of stuff that's better off being encapsulated.

I can't really make any comparisons re Matlab since I've only used Matlab for something beyond calculations once or twice (physics simulations mainly). Ruby probably lacks extensive scientific/numerical libraries since it was written by a professional programmer rather than in/for academia IIRC and has less mindshare than Perl to let them creep in.