Dataport Exporting into User's My Document Folder
veerendra
Member Posts: 66
Hi Gurus,
I have to export data into the text file using Dataport and need to store that text file into the User's My Document Folder.
Any one help me to find the path (My Documents for Different User's).
Urgent... ](*,)
Thanks
Veerendra CH.
I have to export data into the text file using Dataport and need to store that text file into the User's My Document Folder.
Any one help me to find the path (My Documents for Different User's).
Urgent... ](*,)
Thanks
Veerendra CH.
Veerendra Ch.
http://midynav.blogspot.com/ (Microsoft Dynamics Navision)
http://midynav.blogspot.com/ (Microsoft Dynamics Navision)
0
Comments
-
Try something like this:
txtFullPath := ENVIRON('HOMEPATH') + '\My Documents\' + 'TheFile.txt';Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0 -
You can use the Windows enviroment variable USERPROFILE to find to the user's personal folder.There are no bugs - only undocumented features.0
-
To get the user directory for examlple \Documents and Settings\{username}
use env. variable HOMEPATH,
to get drive letter for that dir use HOMEDIR.
to get location of My documents dir, you'd have to look into registry:
I think the key is:
\HKEY_CURRENT_USER\software\microsoft\windows\currentversion\explorer\shell folders\personal
Adding My Documents after HOMEPATH is not always correct, because user may change the location of My documents folder and in different win languages My documents is also translated.0 -
Thanks to all,
Its working Fine...
I have used
Path := ENVIRON('USERPROFILE') + '\My Documents\' + 'Textfile001.txt';
=D>Veerendra Ch.
http://midynav.blogspot.com/ (Microsoft Dynamics Navision)0 -
Do not forget that not everywhere is the document folder named with "My Documents"... :-) best way will be to read the folder location from registry...
see registry "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\Personal"
How to read from registry - search MIBUSO.0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 323 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions
