> > > > > These are digital camera pix , the product of an event to which I would > > > like to add a replacement prefix for "dsci" to reflect the nature of > > > the > > > event and a date, so in this case I might choose something lile > > > "bankholiday240803<followed by 0001.jpg> etc. > > > > > > Can someone suggest a script to do this for me so I don't have to > > > manually retype the file name in properties for each file. It would be > > > nice if I could run the script and it asked me for a syntax , which > > > would be different in each event , and then added it in place of the > > > bit > > > of syntax to be removed. > > > I think it might be nice if I could just copy the bash script file to > > > the source directory and run it from there, dunno though . > > >
Here's a script modified from linux magazine dec 02/jan 03. Which will rename files. ----------------------- #!/bin/sh for photo in *jpg; do mv $photo `echo $photo | sed 's/dsci/bankholiday/'` done ----------------------- Run it in the directory where the files are. You can modify to take arguments ($1 $2 etc). test it first ;-) Roland
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com