Hana Likes Coding
Hana Likes Coding

Reputation: 799

how to use a relative path to switch over to a different drive

A method I am using to import images requires me to use a relative path but the pictures I would like to import are on a different drive. I'm not sure if there is a way for me to access that location using a relative path. If not can someone please tell me another way.

Upvotes: 2

Views: 2866

Answers (1)

Frederic Lachasse
Frederic Lachasse

Reputation: 721

Considering that Unix style operating systems do not have drives, I assume that you are using Windows. I do not think you can do that without "cheating". If that is really the only way, I would try to create a symbolic link to this other drive in a location on the origin drive file system. Symbolic links are rare on Windows, but can be created using the mklink command on Windows 7, 2008 and above using the mklink command. After that, you can access your files through a relative path inside the same drive.

Not sure if that will work for you, but worth a try.

Upvotes: 3

Related Questions