Is there a way to (Save and restore current path)

Posted By: Nidhogg

Is there a way to (Save and restore current path) - 10/05/11 00:37

Hi there, As the topic suggests.

This is because when I open a file in a different folder or drive, GS has trouble with it's Defined paths and spits out
can't open/find file errors.
So I was thinking if I could save the work folder in a tmp string I could change back to the work folder after open the external file.

Thanks for any help.
Posted By: fogman

Re: Is there a way to (Save and restore current path) - 10/05/11 06:17

function SetDir()
{
// switch to executable directory
_chdir( work_dir.chars ) ;
}

You have to include windows.c and / or stdio.c (try it)
Posted By: Nidhogg

Re: Is there a way to (Save and restore current path) - 10/05/11 08:53

Will give it a go, Thanks!
© 2024 lite-C Forums