[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]
On Wed, 24 Dec 2008, Simon Robert wrote: > sorry about being hopeless, but... > > I don't know enough about ftp macros to be able to put one together. I'm > not sure if ftp rename uses wildcards anyhow, so any renames would be > arduous. A way round it might be to get a directory listing in a text file, then edit the file to contain lines like: rename cindi_001-l.jpg cindi_001.jpg rename cindi_002-l.jpg cindi_002.jpg etc. then copy & paste the file into the FTP command line... Crude but effective, esepcially if you can automatically generate the commands above. Sometimes brute force is easier... > I need to rename, for example, cindi_001-l.jpg to cindi_001.jpg. > > The cms app that this site runs has a rename app using regular > expressions. I've tried, but can't get it to work, would anyone know the > regexp for the above change? A substitute regexp to change cindi_001-l.jpg into cindi_001.jpg might look like s/-l\././ (the dot's just there in-case there's more -l in other bits of hte filename - probably not needed) but how the CMS would interpret that is anyones guess, and there are 2 "native" wildcard rename commands in various Linux installations that behave differently IIRC. Maybe post a screen-shot of what CMS rename page to give us a clue to what it might be expecting? Gordon -- The Mailing List for the Devon & Cornwall LUG http://mailman.dclug.org.uk/listinfo/list FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html