2

This works:

<cfdirectory action="list" name="qry" directory="C:\inetpub\wwwroot\Atlas\" >
</cfdirectory>
<cfdump var="#qry#">

So I know that cfdirectory is working. But this doesn't work:

<cfdirectory action="list" name="qry" directory="\\Vostro420\myDir\">
</cfdirectory>
<cfdump var="#qry#">

It doesn't fail: it just returns an empty result. I can copy/paste the address into Windows Explorer and it navigates to Vostro420\myDir\, so I know it's not a typo.

I'm trying to access a file that's on our local network.

Phillip Senn
  • 43,069
  • 83
  • 242
  • 359

2 Answers2

6

The first thing to check here is the permissions. If you are trying to access a remote / mapped network drive, the ColdFusion service will need to be changed to run as a user in the domain of the networked drive, and with permissions that allow it to read / write to that mapped drive.

So, make sure that ColdFusion has the correct permissions to access the systems on the mapped drive and you should be all set. :)

The Adobe ColdFusion help archives has a nice article on how to run ColdFusion as a specific user:

http://helpx.adobe.com/coldfusion/kb/running-coldfusion-specific-user.html

Matt Gifford
  • 1,210
  • 8
  • 13
-1

I have this working on a server at home, but I attached the network location as a logical location. So instead of my path being:

//COMPUTERNAME/DIRECTORY

I'm using:

X:/DIRECTORY

The only times I have issues is when the network computer sleeps :P

ShortRound1911
  • 2,174
  • 1
  • 13
  • 14