web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

getting path and filename from path+filename in NAV 2013 r2

(0) ShareShare
ReportReport
Posted on by

Hi
Is there any easy way of getting the path and filename from path+filename? That is, the user types in the full path like c:\temp\NewFolder\Myfile.txt and then I want to "extract" the information like this:
Path= c:\temp\NewFolder\
Filename = MyFile (with or without extension)

thanks,

Ramesh.

*This post is locked for comments

I have the same question (0)
  • Roberto Stefanetti Profile Picture
    12,998 on at

    hi,

    look at this old post on Dynamics User Group.

    Getting path and filename from path+filename

    dynamicsuser.net/.../35049.aspx

  • Community Member Profile Picture
    on at

    please check the below.

    getting path and filename from path+filename

    dynamicsuser.net/.../35049.aspx

  • Community Member Profile Picture
    on at

    Hi Thanks For reply

    but on that old post i am only given Path but i want to Select Path Dynamicaly....

  • Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    What do you mean by dynamically?

    Can you give more details?

  • Community Member Profile Picture
    on at

    Dynamically mean D:\test1\file1.txt

  • Mohana Yadav Profile Picture
    61,001 Super User 2025 Season 2 on at

    it means that you are not going to provide any path any where?

    so where should it check?

  • Suggested answer
    4BzSoftware Profile Picture
    6,073 on at

    Hi Ramesh,

    All your requirements are in System.IO.Path class:

    - GetDirectoryName.

    - GetFileName.

    - GetFileNameWithoutExtension.

    Add a DotNet variable with Subtype System.IO.Path.'mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans