Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: How to change a file extension ?

From: rotenca:telvia:it at: 13-Jan-2002 19:36

Hi Patrick,
> infile: to-string %/d/rebol/prog.r/program.r > ext: find/last infile "." > outfile: copy/part infile (length? infile) - (length? ext) > append outfile ".bak" > print outfile > > It seems to me a bit complicated. Does anyone have a better (simpler) > solution ?
one mode: file: %/c/d/e/f.ext-with clear change find/last file "." ".r" probe file another file: %/c/d/e/f.ext-with change/part find/last file "." ".r" tail file probe file --- Ciao Romano