Windows, cfdirectory and network path
I have code that reads a network share to get a list of directories which then I compare to another newtwork share to determine if there are duplicate folders (same name folder in both network shares). I had the code running correctly on ColdFusion 2016 (Linux) but we are now on ColdFusion 2023 (Windows Server 2022) so i'm working on updating the code to access the network share on the CF2023 server.
I've tried just using the network share location but that doesn't return anything and then I tried mapping a drive in Windows to access this share but I get a directory not found error. I also tired using the linux network share '/nas/root' but that just throws errors saying it doesn't exist (which is to be expected).
The code below is what i'm using to test cfdirectory. It looks like ColdFusion can read and write to the network shares but when I run the cfdirectory to get a listing of directories nothing is returning. I've been in the weeds so long trying to resolve this that I can't figure it what is happening/not happening. What am I missing? Thank you for any help you can give me.
TESTING CODE
<cfset directoryLink = "\\sashq\root\dept\GMS_Work">
<cfset fileInfo = getFileInfo ( directoryLink ) >
directoryLink: <cfoutput>#directoryLink#</cfoutput>
<cfdump var="#fileInfo#" >
<br><br>
<cfdirectory directory="#directoryLink#" action="list" name="workingFolders" type="dir" recurse="no" >
<cfdump var="#workingFolders#" label="directory listing - test 1">
<br><br>
<cfset directoryLink = "//sashq/root/dept/GMS_Work">
<cfset fileInfo = getFileInfo ( directoryLink ) >
directoryLink: <cfoutput>#directoryLink#</cfoutput>
<cfdump var="#fileInfo#" >
<br><br>
<cfdirectory directory="#directoryLink#" action="list" name="workingFolders" type="dir" recurse="no" >
<cfdump var="#workingFolders#" label="directory listing - test 2">
OUTPUT
directoryLink: \\sashq\root\dept\GMS_Work
struct
| canRead | YES |
| canWrite | YES |
| isHidden | NO |
| lastmodified | {ts '2024-06-12 09:57:09'} |
| name | GMS_Work |
| parent | \\sashq\root\dept |
| path | \\sashq\root\dept\GMS_Work |
| size | 0 |
| type | directory |
directory listing - test 1 - query
| Attributes | DateLastModified | Directory | Link | Mode | Name | Size | Type |
directoryLink: //sashq/root/dept/GMS_Work
struct
| canRead | YES |
| canWrite | YES |
| isHidden | NO |
| lastmodified | {ts '2024-06-12 09:57:09'} |
| name | GMS_Work |
| parent | \\sashq\root\dept |
| path | \\sashq\root\dept\GMS_Work |
| size | 0 |
| type | directory |
directory listing - test 2 - query
| Attributes | DateLastModified | Directory | Link | Mode | Name | Size | Type |
