BuildPath replacement? [beginner]

G

Grok

Would someone point me to the VB.NET replacement for the BuildPath
member of the FileSystemObject?

I would like to concatenate a path without having to write the mundane
code determining whether the separators "/" are present. BuildPath did
this in the past.

newFullPath = fso.BuildPath(dirPath, filename)
 
T

Tom Shelton

Would someone point me to the VB.NET replacement for the BuildPath
member of the FileSystemObject?

I would like to concatenate a path without having to write the mundane
code determining whether the separators "/" are present. BuildPath did
this in the past.

newFullPath = fso.BuildPath(dirPath, filename)

System.IO.Path.Combine
 
P

Pedro Luna Montalvo

You should try:

newFullPath = System.IO.Path.Combine(dirPath, filename)


PeterMoon,
Gye, Ecu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top