Subj : getcwd() ideas? toDo? To : Ragnarok From : Angus McLeod Date : Sun Feb 10 2008 09:46 am Re: getcwd() ideas? toDo? By: Ragnarok to DOVE-Net.Sync_JavaScript on Sun Feb 10 2008 05:36:00 > using file class: > var f = new File("/etc/apache2/httpd.conf"); > write (f.get_dir()); > > using globals: > write (file_getdir('/etc/apache2/httpd.conf')) > > will show '/etc/apache2' Without trailing separator: writeln( "/etc/apache2/httpd.conf".replace( /^(.*)\/.*$/, "$1" ) ); WITH trailing separator: writeln( "/etc/apache2/httpd.conf".replace( /^(.*\/).*$/, "$1" ) ); Enjoy! --- Playing: "Song for Bob Dylan" by "David Bowie" from the "Hunky dory" album. --- þ Synchronet þ Making sure Jason works OK at The ANJO BBS .