Jump to content
Macro Express Forums

Folder Name As String


Cory

Recommended Posts

Is there a simple way to get just the folder name without the entire path? E.g., from "\\server\share\dir1\dir2" get simply "dir2". I am currently setting string by browsing to folder and then deleting text but if the directory tree above changes this wont work. I'm thinking I must be missing something simple here.

Link to comment
Share on other sites

I'm sorry, I must be dense. If I use "Variable set string from folder name" and browse to "\\server\share\dir1\dir2" and stick that in T1 then do the "Variable Set From File Path" and choose the path tick box on the right I get ""\\server\share\dir1\" but what I want is "dir2". What am I missing? Thanks!

 

<TVAR2:01:10:><VFFILE:1:F:1:T:1:F:1:F:1:%T1%>

Link to comment
Share on other sites

(said like Beavis) Yes Yes Yes!!!!! That rules!!!

 

Thanks! I'm always missing the obvious. I just assumed since there was no file name that it wouldn't apply. Just in time too, I was just wrapping this up.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...