|
From: Joe L. <jo...@la...> - 2001-04-19 21:50:49
|
On Thu, 19 Apr 2001, [ISO-8859-1] Dirk Möbius wrote: > Hello Joe, > > > I have this hacked in for you now. It simply checks to see if the second > > character of the string is a ':'. It assumes a full path if it is, and > > adds the current dir if it is not. > > Thanks! NP. > > > Is there a better way to find out if this is a full path? (I don't do a > > lot of Win programming. Can there be a case where a path starts with a > > label instead of a drive letter?) > > No, but it could be a share: e.g. \\ZEUS\dir\file.txt . > Hmm.. So what is the accepted way to see if a path is a full path on Windows? Work backwards char by char until you hit a backslash. Then be sure that is not an escape char...?? Ugh.. I bet there is some kind of basename support, anyone? Tell me the Windows function to use for this and I will put it in there. The current version will be broken by anything without a ":" as the second character (e.g. C:\ F:\ etc.) Joe Laffey LAFFEY Computer Imaging St. Louis, MO ---------------------- Need to do multi-file string replacement in Un*x, but don't want to mess with sed? Try rpl. It's a free text replacement utility with source. http://www.laffeycomputer.com/rpl.html -- Check it out! ------------------------------------------------------------------------ |