![]() |
|
Carpe looking for a programmer - Printable Version +- Forums (https://www.carpe-tdm.net) +-- Forum: Piston broke (https://www.carpe-tdm.net/forumdisplay.php?fid=5) +--- Forum: Hyde Park Inn (https://www.carpe-tdm.net/forumdisplay.php?fid=16) +--- Thread: Carpe looking for a programmer (/showthread.php?tid=37404) |
Carpe looking for a programmer - Guinness - 10-04-2006 im starting the conversion of all the asp pages to php pages. to do that I need a good "multi file text replacer" tool. so something FREE that will replace a certain line of text into another line of text in all files (of a certain type) in one folder. otherwise i have to do this by hand, file per file... not gonna happen. any programmers amongst the carpedians? need an input field to input what string (containing " and < > ) to replace an input field to input what to replace it with an input field to specify the file extension of the files this replace is needed (.asp) (<i>input field for the new file extension for that file</i>) and a field to specify in what folder to look, then it has to do the replacing in all the files in that folder. (<i>and would be handy if it changed the extension from when done</i>) Carpe looking for a programmer - dazzo - 10-04-2006 http://asp2php.naken.cc/download.php Any good to you? Carpe looking for a programmer - Guinness - 10-04-2006 thankks! if this doesnt require an installation on a server those will defo help with the filename and link conversions. am checking for the text replacement side of it... that jaguar one looks promising ok, now they got me confused <!--quoteo-->QUOTE<!--quotec-->from http://jaguar.daemonprojects.com/downloads.php Jaguar Asp2Php (Windows) Download (987KB) This is the Windows installer for Jaguar Asp2Php. <!--coloro:#CC0000--><!--/coloro--><b>Note: you need asp2php for Jaguar asp2php to work, this is only the front end to asp2php. </b> <!--colorc--> <!--/colorc--><!--QuoteEnd--><!--QuoteEEnd--> why dont he just put in a link? edit : I have to install development tools for this to work? wut are these dudes on about? scrap that... next option... Carpe looking for a programmer - dapleb - 10-04-2006 I'll ask Trampboy if he can help! Carpe looking for a programmer - andyj - 10-04-2006 It's now Linux hosted, isn't it? Anyone want to put together a suitable combination of commands using sed? something like ... <!--fonto:Fixedsys--><!--/fonto--><!--sizeo:1--><!--/sizeo--> cd sourcedir; ls -1 *.asp | while read inp; do cat "$inp" | sed /oldlocation/newlocation/ > ../destdir/"$inp".new ; done; cd .. <!--sizec--> <!--/sizec--><!--fontc--><!--/fontc--> Nobody pick me up on my shell scripting, right? I'm tapping this away on a windows box. Carpe looking for a programmer - v8guy - 10-04-2006 <!--quoteo(post=2199:date=Mon 10th Apr 2006, 07:53 PM:name=andyj)-->QUOTE(andyj @ Mon 10th Apr 2006, 07:53 PM) <{POST_SNAPBACK}><!--quotec-->It's now Linux hosted, isn't it? Anyone want to put together a suitable combination of commands using sed? something like ... <!--fonto:Fixedsys--><!--/fonto--><!--sizeo:1--><!--/sizeo--> cd sourcedir; ls -1 *.asp | while read inp; do cat "$inp" | sed /oldlocation/newlocation/ > ../destdir/"$inp".new ; done; cd .. <!--sizec--> <!--/sizec--><!--fontc--><!--/fontc--><!--QuoteEnd--><!--QuoteEEnd--> <!--fonto:Fixedsys--><!--/fonto--><!--sizeo:2--><!--/sizeo--> for i in *.asp; do sed -i .bak s/oldstring/newstring/g $i ; done <!--sizec--> <!--/sizec--><!--fontc--><!--/fontc--> That should do it. Carpe looking for a programmer - andyj - 10-04-2006 Carpe looking for a programmer - wicklamulla - 14-04-2006 ya forgot the full "." !! Carpe looking for a programmer - Guinness - 14-04-2006 im impressed but uhm ... im lost... i meant a lil windows m$ application, not a unix script, i dont have unix/linux on my puter and i dont feel comfortable enuff with (<i>read: i know ferkall about</i>) unix/linux or servers to go mess about directly on the server Carpe looking for a programmer - andyj - 14-04-2006 <!--quoteo(post=2414:date=Fri 14th Apr 2006, 11:17 PM:name=Guinness)-->QUOTE(Guinness @ Fri 14th Apr 2006, 11:17 PM) <{POST_SNAPBACK}><!--quotec-->im impressed but uhm ... im lost... i meant a lil windows m$ application, not a unix script, i dont have unix/linux on my puter and i dont feel comfortable enuff with (<i>read: i know ferkall about</i>) unix/linux or servers to go mess about directly on the server<!--QuoteEnd--><!--QuoteEEnd--> Oh happy DOS hacking days, this still works in XP! If you don't mind the file names being made upper case and they're already all 8.3 format, this will work and create .BAK backup files of all the changes. It assumes the files are all .php. If they're something else, substitute it in the penultimate line. It uses a [ to seperate searched for text and substitute text. Create a directory C:\SCRIPTS and copy your files into it Go <Start><Run> cmd <CR> Enter 'cd c:\scripts' <CR> Enter 'edit cmds.txt' <CR> Enter '1,r' followed by the character sequence you want to search for followed by '[' followed by its replacement text Enter <CR> Enter 'e' <CR> Enter <CTRL><HOME> Enter <ALT>S followed by R Enter '[' and press the tab key Enter <CTRL>Z Enter <ALT>A Press <CR> when informed the change is complete Enter <ALT>F followed by X followed by Y Enter 'for %a in (*.php) do edlin %a < cmds.txt' <CR> Enter 'exit' <CR> Carpe looking for a programmer - andyj - 14-04-2006 Failing that, $25 will get you a Windows Search & Replace utility from http://www.funduc.com/search_replace.htm Carpe looking for a programmer - Guinness - 14-04-2006 was a listing of lots of these handy FREE tools in one the Netwerk magazines couple of issues ago thats why i was stocking them in one of the spare bedrooms guess what... i threw them out last week... TYPICAL Carpe looking for a programmer - v8guy - 15-04-2006 <!--quoteo(post=2414:date=Fri 14th Apr 2006, 10:17 PM:name=Guinness)-->QUOTE(Guinness @ Fri 14th Apr 2006, 10:17 PM) <{POST_SNAPBACK}><!--quotec-->i meant a lil windows m$ application, not a unix script, i dont have unix/linux on my puter and i dont feel comfortable enuff with (<i>read: i know ferkall about</i>) unix/linux or servers to go mess about directly on the server<!--QuoteEnd--><!--QuoteEEnd--> If you want a hand doing it, let me know; ping me on the IRC channel. My nickname in there is 'upsetter'. Carpe looking for a programmer - andyj - 15-04-2006 OK, so seredipity strikes again. Care of ET Junior in the Commuters Motorcycle Club, 2 FREEWARE search & replace tools: dsFSR TexRep 2.0 |