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)

Illegal Characters in Path

(0) ShareShare
ReportReport
Posted on by

Hello,

I am trying to open a file but I am getting error saying Illegal characters in PATH.

I am expecting system to go to server's Desktop folder. Although, I have SomePdfFile.pdf on both Server and Client's Desktops.

My code:

myPathVariable := 'C:\Users\muUserName\Desktop\SomePdfFile.pdf';

File.Open(myPathVariable); //results in illegal character in PATH error message.

Any suggestion?

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    It will go to the user client's desktop, not the server. If you want to open the server's path, you need to share the folder and do \\server\path\file.pdf

  • Community Member Profile Picture
    on at

    I have the same file on Client's Desktop too. But still getting the error.

  • Suggested answer
    Teddy Herryanto (That NAV Guy) Profile Picture
    14,284 Super User 2025 Season 2 on at

    Is C:\Users\muUserName\Desktop\SomePdfFile.pdf exist on that desktop ?

    I am assuming muUserName is not the real username.

  • Suggested answer
    RockwithNav Profile Picture
    8,635 Super User 2025 Season 2 on at

    Where exactly the cursor is  breaking while debugging?

    Seems to be some path related issue.

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