bakr_2k5
Dec 6 2006, 04:49 PM
Hello there, Today I've encoded lots of mp3's for my portable mp3 player (which only has 128mb ...  ), Anyway I encoded them with Lame using mlame script (for those don't know it handles more files then one). Now mlame appends "-new-converted-file" to the filename. And renaming every individual file with the hand is A LOT of work  . I tried to write a script to remove that "-new-converted-file" but they kinda all failed! And the "tr" command seems it can't handle sentences. 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  . Thank you!) Bakr_2k5
Comment/Reply (w/o sign-up)
Mark420
Dec 6 2006, 05:23 PM
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)
Comment/Reply (w/o sign-up)
bakr_2k5
Dec 6 2006, 07:11 PM
QUOTE(Mark420 @ Dec 6 2006, 07:23 PM)  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  ) called "rename". Very oblivious, well my topic lately are a bit lame guess I need more sleep... Anyway I just do this: rename -new-converted-file.mp3 .mp3 *.mp3 And it works  So problem solved, and thank you Mark420 for your reply! Think I'm going to work on a script for Nautilus (gnome's file manager) to integrate this stuff  Bakr_2k5
Comment/Reply (w/o sign-up)
qwijibow
Dec 8 2006, 01:30 PM
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.
Comment/Reply (w/o sign-up)
bakr_2k5
Dec 8 2006, 02:59 PM
QUOTE(qwijibow @ Dec 8 2006, 01:30 PM)  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! 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? 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  ), to do these things! Bakr_2k5
Comment/Reply (w/o sign-up)
nightfox
Dec 9 2006, 03:14 AM
QUOTE(qwijibow @ Dec 8 2006, 08:30 AM)  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!!  Doesn't have to be "open" source... take IPB. Not open source, but the source code is available for modifications! [N]F
Comment/Reply (w/o sign-up)
borlafu
Dec 10 2006, 11:27 PM
QUOTE(qwijibow @ Dec 8 2006, 02:30 PM)  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
Comment/Reply (w/o sign-up)
vujsa
Dec 11 2006, 04:19 AM
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
Comment/Reply (w/o sign-up)
Similar Topics
Keywords : file, rename, script, sentence, large, collection, files, rename
- Linux Basic Command - For Storing Compilation Error To File
(1)
How To Copy File & Folders From Linux To Windows?.
(13) Many face problem while transfering file from Linux to windows and Vise versa. My solution for
this is "winscp405". Winscp is a windows freeware tool used to copy file from & to Linux machine.
To get this tool just google for " winscp405" tool and download this small package and install.
Enjoy working with Linux and windows /tongue.gif" style="vertical-align:middle" emoid=":P"
border="0" alt="tongue.gif" />....
Linux And Windows Partitions
Sharing files back and forth (2) Introduction Ok so many of you that use Linux, you probably have Windows installed also,
probably on another partition (an exception is using Wubi). There is a problem that exists with
Linux having read-only access to NTFS partitions. A solution to this is to install NTFS-3G or a
similar package/application, but this only solves half of the problem. The other half of the
problem is Windows not being able to read an ext2/ext3 partition. If you check your partitions in
Disk Management, Windows has absolutely zero support for ext3/ext2/linux-swap partitions, displ....
Simple Ubuntu Based Home File Server | For Newbies
(1) This tutorial explains how to turn an old PC with additional hard disks into a simple home file
server. The file server is intended for home use. The home file server is accessible by Windows and
Linux computers in the home network. http://www.howtoforge.com/ubuntu-home-fileserver
_________________________________ http://dserban01.googlepages.com/linkedin....abap.basis.html ....
Linux - Handy Tool If You Can't Unmount Due To Open Files
(0) lsof The author of the article below says he uses lsof most for getting network connection
related information from a system, but netstat is just as useful and made specifically for this
particular purpose. lsof will do more than network connections, though. It will also tell you what
files the program has open in addition to unix sockets and libraries. Of course you could also get
all this from /proc but lsof makes it nice and easy. 'of' is actually for 'open
files'. http://dmiessler.com/study/nix/commands/lsof/ or http://img231.imageshack.us/img2....
Ubuntu Livecd
Can't see all my files!!! (7) Hey, i got a Ubuntu LiveCD and it works perfectly. Seems like a good change from Windows from time
to time. The only problem i am having is that i cant find some files that are on my C:/ drive (the
Windows area) - although i can see them through windows no problem. Example is that when i go to the
documents and settings folder on the C drive, no folders are there. When i go back to windows, its
there! Can someone please tell me how can i see my files via ubuntu. I am quite a newbie to Ubuntu
so please excuse me if this is a n00b question /tongue.gif" style="vertical-....
Share Files With Samba
(2) I've been asking along this week , how to set a authentication prompt on windows 2000
professional , because i'm trying to create a secure file sharing cpu. Well... i remembered that
linux is very great in stability and secure. I've downloaded and installed Mandriva 10.1 because
he already brings Samba package, but i cant get him inside my workgroup, because he creates a
defautl work group "mdkworkgroup" something like that. I'm not very expert in linux systems but
i know that he can be configurated to Serv Files Sharing ( Only ). I know there are alots ....
How To Remove The ^m In Cpp Files ?
A^M at the end of each line in a source (5) My friend just sent me a program source file. It is a *.cpp file (C++ source). When I open with
text editor (gedit), there is a ^M at the end of each line. Then I try vim and emacs. they just give
me a same result. What is that ^M??? Why does it there??? How can I delete them all (not one by
one)??? Thank you.....
Play .avi Files In Redhat
Need help in installing divX codecs... (6) The last few days have been spent in trying to get .avi files (Previously encoded using DivX codecs
in Windows). I've a collection of movies that I've backed up as .avi files and I'm out
of options trying one thing after another. So far: I have installed Helix player & Real Player; I
have the DivX4Linux files but do not know how to install these (unlike configuring and 'make
install' since there is no configure file and there are not instructions either). Also, Xine
player (Xine-UI) which I've finally got working plays VCDs DVDs and Audio CD....
.tcl Files, How To Open One?
(2) Ok, after my first question about Linux here's already another one. I have some .TCL files that
I have to open, do you know how to do that? I would realy appreciate any help. -=jeroen=-....
Core.xxxx Files In /
what are they?? (3) OS:red hat 9.0 There are thousands of core.xxxx files were found in the root directory (/)
# ll |more total 3082181 drwxr-xr-x 2 root root 4096 May 30 23:45 bin drwxr-xr-x 4 root root 1024
May 30 22:33 boot -rw------- 1 root root 442368 Jun 21 10:52 core.1002 -rw------- 1 root root 446464
Jun 21 10:52 core.1003 -rw------- 1 root root 438272 Jun 21 10:52 core.1004 -rw------- 1 root root
442368 Jun 21 10:52 core.1005 -rw------- 1 root root 446464 Jun 21 10:52 core.1007 -rw------- 1 root
root 442368 Jun 21 10:52 core.1010 -rw------- 1 root root 446464 Jun 21 10:5....
Complie Mplayer With Gcc4.0
Patch file is provided (1) GCC 4.0 comes with the new Fedora core 4. MPlayer cannot be compiled in this new environment. If you
have Fedora core 4 or upgraded to GCC4 and have problems on compiling MPlayer, now worry, follow the
steps: 1. Download all neccessry files. They are: * the source code of mplayer, I prefer
the latest release: MPlayer-1.0pre7.tar.bz2 * mplayer-1.0_pre7-gcc4.patch . As you can see, this is
a patch file for MPlayer 1.0pre7, In order the compile mplayer under gcc-4.0 environment, this
patch must be applied This patch file can be download here: http://www.mag....
How Can I Hide Files And Processes In Linux?
(3) Can any one tell me how to hide files and processes in Linux? for example, there is a *.exe file, I
don;t want anybody to see it (just hide it), including use ls command. if I run this program, the
process can be list by ps command. Is it possible to hide this process?? if yes, how to do that??
Thank you.....
Running Shell Script And Redirect To Log File?
(4) I have a shell script like this: while true do sh a.sh sh b.sh done now I want the script not just
call and run a.sh and b.sh, but also output some log files. here is what I did: while true do sh
a.sh sh a.sh >>log sh b.sh sh b.sh >>log done I know this is not a good way.... is there any better
way to do it?? Thank you....
No Such File Or Directory While Trying To Open Abl
(5) dear all, Yesterday, I modified the /etc/fstab file in order to mount my usb thumb driver
atomaticly. dev is sba1 and the mount point is /mnt/usb. I cannot remember what other parameters
had been used, as I got something emegene to do. I just use "halt -n" comman to shutdown the PC.
Today, I found that it cannot boot into the system. when it checking root filesystem:
fsck.ext3:ABEL=/: The superblock could not be read or does not describled a coorect ext2 file
system. If the device is valid and it realy contains an ext2 filesystem (and not swap or ufs or
something else)....
Why Do Normal Cannot Use Fat32 Volumn
please, here is my fstab file (3) The following is my fstab. /dev/hda1 and /dev/hda5 is fat32 format. root can use after login, but
nor the normal users. why? and how can I allow normal users to read the files inside fat32?? #
/etc/fstab: static file system information. # # proc /proc proc defaults 0 0 /dev/hda6 /
reiserfs notail 0 1 /dev/hda7 none swap sw 0 0 /dev/hdc /media/cdrom0 udf,iso9660 ro,user,noauto 0 0
/dev/hda1 /mnt/winc vfat rw,user,auto 0 0 /dev/hda5 /mnt/wind vfat rw,user,auto 0 0 /dev/sda1
/mnt/usb auto rw,user,auto 0 0....
Help ! Can't Install Rpm File
(2) I just installed redhat 9. and try to install some software. I use the following comman to do so:
rpm -ivh file.rpm After I press Enter key, error message was shown: "can't create transaction
lock" what should i do?....
Looking for file, rename, script, sentence, large, collection, files, rename
|
See Also,
*SIMILAR VIDEOS*
Searching Video's for file, rename, script, sentence, large, collection, files, rename
|
advertisement
|
|