Notifications
Clear all
[Closed] simple paths question
Jun 28, 2006 6:25 am
well here is a fast question. If I do
f = getOpenFileName
a dialog opens and i navigate to a file. Then “f” has a value sth like this:
E:\source\foliage\proxies\b1.vrmesh
but in order to use this string as a path, I need sth. like this:
E:/source/foliage/proxies/b1.vrmesh
or
E:\\source\\foliage\\proxies\\b1.vrmesh
how do I do that ?
2 Replies
Jun 28, 2006 6:25 am
Dont use “/” coz it will start messing things up.
Do a loop through your path+filename and load it into a new array.
everytime you encounter a “” you replace it with a “\”
something like:
old_path = “c:\dir\file.txt”
new_path = “”
for n = 1 to old_path.count do
(
if old_path[n] == “\” then (new_path = new_path + “\\”)
else (new_path = new_path + old_path[n])
)