Current Directory
- Posted by Derek Parnell <ddparnell at bigpond.com> Feb 12, 2003
- 586 views
In Windows and DOS environments, how can I get Euphoria to tell me the current directory of a drive that is not the current drive? My understanding is that each drive in a DOS/Windows system has its own current directory setting. I know that current_dir() will give me the directory that I started running the Euphoria program from, but how do I find the current diretory of any of the other drives. If possible, I'd prefer NOT to use a Windows API or DOS interrupt to get the info. In fact, what I'm trying to do is write a function that is given a filepath string, and have it return the same path but in standardized - full - form. This should take into consideration any ".\" and "..\" and leading "DRIVE:" combinations. I've almost succeeded except for paths given in the form ... P:myfolder\myfile.abc I know the drive "P:" but the rest is supplied relative to the current directory *on that drive*! And now I need to know how to get that info. Maybe somebody has already got a neat function that does all this (hint, hint). I'm not even going to try network paths yet -- cheers, Derek Parnell