Welcome

Welcome to my blog. Here you can find few tips about Microsoft Dynamics NAV.

Thursday 17 May 2012

Getting the path of the filename

I had an issue on getting the path of the filename provided with full path.

example:
My filepath is D:\navision\File1.txt. now i have to seperate only D:\Navision from the filepath.

Finally i got the answer
 
We have to create an automation server for Windows Script Host Model.Wshshell

and after that code like this:

if isclear(wshshell) then
  create(wshshell); // where wshshell is the automation server of Windows Script Host Model.Wshshell
message(wshshell.currentdirectory);


Regards,
Reka.S

No comments:

Post a Comment