OpenFileDialog: Return just file name
-
Does anybody know of a way to return just the file name (without the full path) using the OpenFileDialog? Example:
OpenFileDialog.FileName
returns ‘c:\dir1\textfile.txt’ But I wantOpenFIleDialog.??
To return ‘textfile.txt’ Thanks Brad -
Does anybody know of a way to return just the file name (without the full path) using the OpenFileDialog? Example:
OpenFileDialog.FileName
returns ‘c:\dir1\textfile.txt’ But I wantOpenFIleDialog.??
To return ‘textfile.txt’ Thanks BradRun the full path trough the Path.GetFileName Method[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Run the full path trough the Path.GetFileName Method[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
Run the full path trough the Path.GetFileName Method[^]. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks Dave/Andrew. That worked perfect.
-
And if u want any more info just... dim fileInfo as new io.FileInfo(Path) FileInfo contains alot of extra info.
And you're telling me this why? Tell the OP, he'll get an email that say you responded to HIM, not me. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
And you're telling me this why? Tell the OP, he'll get an email that say you responded to HIM, not me. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
When you reply to a post, CodeProject sends an email to the person who you replied to. Since you replied to me, only I got the message that you posted a reply to one of my posts. I didn't ask a question or wanted any more information, but the person who Originally Posted the question could have used the information y you posted in a reply to me. Reply to the OP and he/she will get the message that you replied to him/her. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
When you reply to a post, CodeProject sends an email to the person who you replied to. Since you replied to me, only I got the message that you posted a reply to one of my posts. I didn't ask a question or wanted any more information, but the person who Originally Posted the question could have used the information y you posted in a reply to me. Reply to the OP and he/she will get the message that you replied to him/her. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome