I tried to list all files reside in Network Attached Storage using or directorylist() and for some reason always give me no result. The path I am using like this //10.15.0.56/storage2. I am running Lucee Velvet on Windows 2003 Server and the Lucee service is running under Administrator user.
local.source = directoryList('//10.15.0.56/storage2',false,"query",'*','asc','file');
if you run a batch file via cfexecute can it access that directory?
I tried the code below:
<cfexecute name="type.exe" arguments="\\10.15.0.56\storage2\country.txt" outputfile="c:\result.txt" errorfile="c:\resulterr.txt" >
and it won’t do anything. Neither creating result file nor resulterr file nor any outputs.
Do I miss something?
try running local batch file i.e. in c:\temp with the following content
I tried to do “dir” on c: drive and it won’t output anything neither the output nor the error. However, I can list the file on c drive using DirectoryList().
<cfexecute name="dir.exe" arguments="c:\" variable="test" errorvariable="err">
you could always use the jCIFS library to access smb drives directly so you don’t need to mess around with windows permissions for the account lucee is running under,
i.e. you can just pass in the user & pass for the network share directly
Thanks Zac. It works. The Directorylist() is timing out and for some reason it didn’t raise any errors and as soon as I extend the time out and I got the result back.
you mean timeout for the whole request?
First test at the command line from the OS. More often than not, its an OS issue, not a software application issue.
if you can mount the drive (windows) or volume (*NIX) then you can just use local commands as normal for that directory.