Conversion of pathnames from Unix/Linux to Windows operating system

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Conversion of pathnames from Unix/Linux to Windows operating system

Jean Schuermans
Hi all,

I have a code for a macro to be used with a Unix/Linux operating system. However, I wish to use the same macro but using a computer currently operating with Windows.

How should I change the pathnames?

i.e. How will the following example of a path name change:

OutDir="/home/user/Perso/RootScanning/Out2/";

Thank you very much for your replies,

Cheers,

Jean

Please find our Email Disclaimer here: http://www.ukzn.ac.za/disclaimer/
Reply | Threaded
Open this post in threaded view
|

Re: Conversion of pathnames from Unix/Linux to Windows operating system

dscho
Hi,

On Wed, 18 Jul 2007, Jean Schuermans wrote:

> How should I change the pathnames?
>
> i.e. How will the following example of a path name change:
>
> OutDir="/home/user/Perso/RootScanning/Out2/";

That depends on the system.  AFAIK on "modern" Windowses such as 2000 and
upwards, it is no problem to use the forward slash "/" instead of the
backward slash "\" that DOS used (to distance itself from Unix).

But the home directory changes from OS to OS, even from Windows to
Windows.  The safest method would be to use the macro function
"getDirectory()" with the parameter "home", I guess.  So, your macro
should read like this:

OutDir = getDirectory("home") + "Perso/RootScanning/Out2/";

Hth,
Dscho