How can I read all the files from a path?

Sipiha
Member Posts: 2
Hi all,
I have a problem when I want to read some files from my Lan network directory. The Code is like:
Depending on witch is the path (\\MyServer\MyDirectory\) or local one, it finds files or not. For example, in \\MyServer\MyDirectory\ doesn't find any file (there are) but if I put this, it finds correctly:
What can be the problem? path permissions (but it allows me to get 1 file)...
If someone can helps me, I would be grateful.
Thank you.
I have a problem when I want to read some files from my Lan network directory. The Code is like:
CLEAR(rlFile); rlFile.SETRANGE(Path, '\\AnotherServer\MyDirectory\'); rlFile.SETRANGE("Is a file", TRUE); IF rlFile.FINDSET THEN REPEAT vFile := rlFile.Path + rlFile.Name; vRutaServidor := cFileManagement.UploadFileSilent(vFile ); flFile.OPEN(vRutaServidor); flFile.CREATEINSTREAM(InStream); XMLPORT.IMPORT(50009,InStream); flFile.CLOSE; UNTIL rlFile.NEXT = 0;
Depending on witch is the path (\\MyServer\MyDirectory\) or local one, it finds files or not. For example, in \\MyServer\MyDirectory\ doesn't find any file (there are) but if I put this, it finds correctly:
vFile := '\\AnotherServer\MyDirectory\myfile.XML'; vRutaServidor := cFileManagement.UploadFileSilent(vFile); flFile.OPEN(vRutaServidor); flFile.CREATEINSTREAM(InStream); XMLPORT.IMPORT(50009,InStream); flFile.CLOSE;
What can be the problem? path permissions (but it allows me to get 1 file)...
If someone can helps me, I would be grateful.
Thank you.
0
Best Answer
-
The problem is almost certain no access.
If the server accesses a file, it does so with the credentials of the service user.
If you want to access a file with the credentials of the client user, upload it first (or, if you absolutely must, use client side Dotnet).1
Answers
-
The problem is almost certain no access.
If the server accesses a file, it does so with the credentials of the service user.
If you want to access a file with the credentials of the client user, upload it first (or, if you absolutely must, use client side Dotnet).1 -
It was an access problem (access denied in port 445). But we need to put in the security of the folder "Anyone" with all permissions. Does anyone knows what minimum permission we have to put to a folder to make folder.FINDSET work?
Thx.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
- 320 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