Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
hi, I have to save two files with the same filename but different extensions. Using DIALOG_PICKFILE creates path+filename+extention. Can you experts tell me the shortest way to get the filename avoiding too many string operations? thanks for help Gernot
I recommend "fdecomp" from Landsman's excellent IDL Astro library: http://idlastro.gsfc.nasa.gov/homepage.html Patrick Broos Reishofer wrote: > hi, > > I have to save two files with the same filename but different > extensions. Using DIALOG_PICKFILE creates path+filename+extention. > Can you experts tell me the shortest way to get the filename avoiding > too many string operations? > > thanks for help > > Gernot -- ============================================================ ======== Patrick S. Broos, Software Engineer patb@astro.psu.edu Department of Astronomy and Astrophysics My office 814-863-7947 Penn State University 525 Davey Lab FAX 814-863-8686 University Park, PA 16802-6305 http://www.astro.psu.edu Group office 863-9550 ============================================================ ========
Gernot Reishofer wrote: > > hi, > > I have to save two files with the same filename but different > extensions. Using DIALOG_PICKFILE creates path+filename+extention. > Can you experts tell me the shortest way to get the filename avoiding > too many string operations? > > thanks for help > > Gernot Dear Gernot, you may use file_path_name_ext from our library. http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_source/idl_ html/dbase/download/file_path_name_ext.tar.gz file='d:\alpha\beta\filen.ext f=file_path_name_ext(file) print, f.path d:/alpha/beta/ print, f.name filen print, f.ext .ext For further routines and licensing please look first at http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml regards Reimar -- Reimar Bauer Institut fuer Stratosphaerische Chemie (ICG-1) Forschungszentrum Juelich email: R.Bauer@fz-juelich.de http://www.fz-juelich.de/icg/icg1/ ============================================= a IDL library at ForschungsZentrum Jï¿½lich http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml http://www.fz-juelich.de/zb/text/publikation/juel3786.html