I am using Windows Authentication and Trusted Connection when I connect to SQL Server.
I have no problem accessing the path and view the files here :
However, when I execute it in a store procedure :
EXEC master.sys.xp_dirtree ' \\mynetworkpath\folder1\', 1, 1
No results returned.
To test further, I copied the files to my local drive and it runs perfectly.
EXEC master.sys.xp_dirtree 'd:\folder1\', 1, 1
I checked, the file attribute and it is not hidden nor read only.
Do you have any idea why the file not showing up ?