|
|
|
| Web Hosting Guide |
![]() ![]() |
File Rename Script, Sentence, Large collection of files to rename! |
Dec 6 2006, 04:49 PM
Post
#1
|
|
|
Member - Active Contributor Group: Members Posts: 83 Joined: 25-September 06 From: The Netherlands Member No.: 16,153 |
Hello there,
Today I've encoded lots of mp3's for my portable mp3 player (which only has 128mb ... Now mlame appends "-new-converted-file" to the filename. And renaming every individual file with the hand is A LOT of work Well does anyone in here have a clue or a nice script to do this? Of course if you only give me a hint to do this. I'll write the script on my own. But if you feel like, you're free to do it (Please no reply about use "sed" or something like that without some explanation, I really don't know anything about it. And I just can't understand the whole "sed" thing Bakr_2k5 This post has been edited by bakr_2k5: Dec 6 2006, 04:50 PM |
|
|
|
Dec 6 2006, 05:23 PM
Post
#2
|
|
|
The Modernator Group: Members Posts: 486 Joined: 6-August 06 From: The Interweb! Member No.: 15,021 |
I can point you to the right direction I hope..
I would use a lightweight PERL script to do this..its perfect for the job! Google up some cool PERL scripts and I am sure you will find one that can rename/replace etc Good Luck! Markyl) |
|
|
|
Dec 6 2006, 07:11 PM
Post
#3
|
|
|
Member - Active Contributor Group: Members Posts: 83 Joined: 25-September 06 From: The Netherlands Member No.: 16,153 |
QUOTE(Mark420 @ Dec 6 2006, 07:23 PM) [snapback]93317[/snapback] I can point you to the right direction I hope.. I would use a lightweight PERL script to do this..its perfect for the job! Google up some cool PERL scripts and I am sure you will find one that can rename/replace etc Good Luck! Markyl) Searched for while for PERL scripts, but the all seem web orientated or CGI stuff. So no real use. But I just discovered a standard linux program (at least I think it's standard Very oblivious, well my topic lately are a bit lame guess I need more sleep... Anyway I just do this: [console]rename -new-converted-file.mp3 .mp3 *.mp3[/console]And it works Think I'm going to work on a script for Nautilus (gnome's file manager) to integrate this stuff Bakr_2k5 This post has been edited by bakr_2k5: Dec 6 2006, 07:13 PM |
|
|
|
Dec 8 2006, 01:30 PM
Post
#4
|
|
|
Way Out Of Control - You need a life :) Group: Members Posts: 1,366 Joined: 14-September 04 From: Nottingham England Member No.: 570 |
1) I would be very surprised if there wasnt a parametr you could pass to the script to cause it NOT to add that string to the file name. 2) You Have the source code !!! Edit the Script. Is this not the reason we love open source ??? if it doesnt do exactly what you want it to... re-program it. |
|
|
|
Dec 8 2006, 02:59 PM
Post
#5
|
|
|
Member - Active Contributor Group: Members Posts: 83 Joined: 25-September 06 From: The Netherlands Member No.: 16,153 |
QUOTE(qwijibow @ Dec 8 2006, 01:30 PM) [snapback]93449[/snapback] 1) I would be very surprised if there wasnt a parametr you could pass to the script to cause it NOT to add that string to the file name. 2) You Have the source code !!! Edit the Script. Is this not the reason we love open source ??? if it doesnt do exactly what you want it to... re-program it. Answer to 1: No there isn't some kind of parameter in mlame or lame itself! [console]This script runs the LAME mp3 encoder on multiple files: /usr/bin/mlame [options] <file 1> ... <file n> options: -? this help text -r remove files after encoding -f force overwrite of destination if exists -l low quality settings -h high quality settings -o "<lame options>" overrides script default options example: /usr/bin/mlame -r -f -o "-v -V 0 -b 112" a*.wav z*.aif g*.mp?[/console]And have tried all those parameters and none did the thing I wanted! Answer to 2: Yes you're completely right, but I don't consider myself a good programmer. I know some basics but none of the advanced stuff (soon it will come). Perhaps I'm a bit to faint-hearted (got that word from babelfish Bakr_2k5 This post has been edited by bakr_2k5: Dec 8 2006, 03:00 PM |
|
|
|
Dec 9 2006, 03:14 AM
Post
#6
|
|
|
NiGHTFoX - Hiding in the dark Group: Members Posts: 680 Joined: 3-April 05 Member No.: 3,584 |
QUOTE(qwijibow @ Dec 8 2006, 08:30 AM) [snapback]93449[/snapback] 2) You Have the source code !!! Edit the Script. Is this not the reason we love open source ??? if it doesnt do exactly what you want it to... re-program it. Amen to that!! [N]F |
|
|
|
Dec 10 2006, 11:27 PM
Post
#7
|
|
|
Member [ Level 2 ] Group: Members Posts: 58 Joined: 9-November 06 Member No.: 17,133 |
QUOTE(qwijibow @ Dec 8 2006, 02:30 PM) [snapback]93449[/snapback] 2) You Have the source code !!! Edit the Script. Is this not the reason we love open source ??? if it doesnt do exactly what you want it to... re-program it. Anyway I think he's not going to fix and recompile the program, and then reencode the songs just to change their name... Take it easy: CODE man rn
|
|
|
|
Dec 11 2006, 04:19 AM
Post
#8
|
|
|
Absolute Newbie Group: Admin Posts: 888 Joined: 20-February 05 From: Indianapolis, Indiana, USA (Midwest) Member No.: 2,714 myCENTs:35.43 |
Well, I just couldn't resist getting involved. I just spent the last 2 hours writting a script to do this for you.
It is PHP based and you may have to move your files to your web root to work but it will strip all of the unwanted formating from your filenames. In linux, you may also need to change the file permissions to do the rename. The script is completely insecure and needs to be placed in a secure location such as a password protected directory. Failure to secure this script will give anyone with public access to your system the ability to rename ALL of your files. This is a very dangerous script if use improperly. The script may be found here: http://www.handyphp.com/component/option,c...d,14/Itemid,25/ Registration is required for download, sorry. I do this to prevent excessive automated downloading by theft bots etc... I hope this helps. vujsa |
|
|
|
![]() ![]() |
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
Similar Topics
| Topic Title | Replies | Topic Starter | Views | Last Action | |||
|---|---|---|---|---|---|---|---|
![]() |
8 | bluefish | 3,131 | 16th March 2010 - 02:01 PM Last post by: iG-op |
|||
![]() |
18 | vicky99 | 7,575 | 24th February 2010 - 08:16 PM Last post by: iG-ivmai |
|||
![]() |
7 | Niru | 4,454 | 20th February 2010 - 07:04 AM Last post by: iG-suresh |
|||
![]() |
5 | jackpinerepublic | 4,390 | 19th February 2010 - 02:04 AM Last post by: iG-Simon Varley |
|||
![]() |
19 | Feelay | 9,186 | 18th February 2010 - 08:47 AM Last post by: iG-Tsholofelo |
|||
![]() |
17 | rapco | 9,923 | 12th February 2010 - 06:48 AM Last post by: iG-Sanjaya |
|||
![]() |
15 | PureHeart | 11,907 | 10th February 2010 - 08:02 PM Last post by: iG-khadeer |
|||
![]() |
14 | jedipi | 7,765 | 10th February 2010 - 05:47 PM Last post by: iG-keith |
|||
![]() |
10 | Eggie | 8,445 | 10th February 2010 - 06:47 AM Last post by: iG- |
|||
![]() |
12 | Nqon | 4,595 | 9th February 2010 - 02:46 PM Last post by: iG- |
|||
![]() |
22 | muazamali | 8,903 | 9th February 2010 - 04:18 AM Last post by: topboys |
|||
![]() |
14 | bob3695 | 10,096 | 8th February 2010 - 09:19 PM Last post by: iG-Manish Patel |
|||
![]() |
6 | Skepticus | 188 | 7th February 2010 - 02:16 AM Last post by: 8ennett |
|||
![]() |
21 | miCRoSCoPiC^eaRthLinG | 1,990 | 4th February 2010 - 05:29 PM Last post by: 8ennett |
|||
![]() |
5 | Jeigh | 3,637 | 3rd February 2010 - 07:16 PM Last post by: iG-Juan |
|||
|
Lo-Fi Version | Time is now: 20th March 2010 - 11:44 AM |
© 2010 AstaHost: Free Web Hosting & Technical Discussion, Free Web Hosting. a member of xisto.
Powered by Invision Board. Skin: IPB Forum Skins
Expand / Collapse Navigation



Dec 6 2006, 04:49 PM






