[C++ /WIN] get full path

Ramin Firoozye ramin at wizen.com
Thu Jan 23 10:04:00 CST 2003


Hi Ruslan,

Not sure if this is what you're looking for:

- _getcwd() (and its various wide-char variants) return current working
directory. You can use _chdir to change the working directory before you
open a file.
- The windows function GetFullPathName() returns a full path given a
relative path.
- If you're using MFC, you can try the CFile method GetFilePath().

Okay, hope this helps,
Ramin

> -----Original Message-----
> From: valentina-bounces at lists.macserve.net
> [mailto:valentina-bounces at lists.macserve.net]On Behalf Of Ruslan
> Zasukhin
> Sent: Thursday, January 23, 2003 8:39 AM
> To: Jochen Peters; Sergey Tretyak; valentina at lists.macserve.net
> Subject: [C++ /WIN] get full path
>
>
> Hi All,
>
> Anybody know how get full path of a file on Windows?
>
> Problem here is next:
> We can call CreateFile() and send to it both
>
>     CreateFile( "d:\fff\gg\ggg.txt" )
>
> And
>
>     CreateFile( "ggg.txt" ) -- will be created in working directory.
>
> How in second case obtain full path of that file ?
>
> --
> Best regards,
> Ruslan Zasukhin      [ I feel the need...the need for speed ]
> -------------------------------------------------------------
> e-mail: ruslan at paradigmasoft.com
> web: http://www.paradigmasoft.com
>
> To subscribe to the Valentina mail list go to:
> http://listserv.macserve.net/mailman/listinfo/valentina
> -------------------------------------------------------------
>
> _______________________________________________
> Valentina mailing list
> Valentina at lists.macserve.net
> http://listserv.macserve.net/mailman/listinfo/valentina



More information about the Valentina mailing list