[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

Getting file path without the filename in it

My problem is the following

I got a common dialog, and i can get the full path of the localization of the file(filename included), but what i really need is just the path .
example:
the file path is:
c:\test\file.txt
and i need:
c:\test

any sugestions
0
intrud3r
Asked:
intrud3r
1 Solution
 
TimCotteeCommented:
Hi intrud3r,

Try using left(filename,instrrev(filename,"\"))

This should return everything up to and including the last \ character.

Tim Cottee
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now