Listing 1: Test code using CFDIRECTORY and CFFILE <!--- _______________Part 1_____________ ---> <h2>List PDF Contents of \\YourRemoteServer\ShareName\</h2> <CFDIRECTORY ACTION="LIST" DIRECTORY="\\YourRemoteServer\ShareName\" NAME="List1" FILTER="*.pdf" SORT="datelastmodified ASC"> <! --- ____________Look At Data In The Directory__________ ---> <!--- Output the files found in the directory ---> <cfoutput>The number of PDF files found in the directory are: <strong>#List1.recordCount#</strong></cfoutput> <br> <CFOUTPUT QUERY=List1> <br> <table border="1" width="40%"> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Name:</b></td> <td width="172"><i>#name# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Size:</b></td> <td width="172"><i>#size# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Type:</b></td> <td width="172"><i>#type# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Date last modified:</b></td> <td width="172"><i>#datelastmodified# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Attributes:</b></td> <td width="172"><i>#attributes# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Mode:</b></td> <td width="172"><i>#mode# </i></td> </tr> </table> </CFOUTPUT> <hr> <BR><BR><BR> <!--- _______________Part 2_______________ ---> <h2>Copy the PDF file from Your CF Server to \\YourRemoteServer\ShareName\</h2> <cffile action = "copy" source = "C:\Inetpub\wwwroot\SomePDFFile.PDF" destination = Ò\\YourRemoteServer\ShareName\"> <CFDIRECTORY ACTION="LIST" DIRECTORY="\\YourRemoteServer\ShareName\" NAME="List2" FILTER="*.pdf" SORT="datelastmodified ASC"> <!--- ___________Look At Data In the remote Directory__________ ---> <!--- Output the files found in the remote directory ---> <cfoutput>The number of files found in the directory are: <strong>#List2.recordCount#</strong></cfoutput><br> <CFOUTPUT QUERY=List2> <br> <table border="1" width="40%"> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Name:</b></td> <td width="172"><i>#name# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Size:</b></td> <td width="172"><i>#size# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Type:</b></td> <td width="172"><i>#type# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Date last modified:</b></td> <td width="172"><i>#datelastmodified# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Attributes:</b></td> <td width="172"><i>#attributes# </i></td> </tr> <tr bordercolor="##333333" bgcolor="##FFFFFF"> <td width="127"><b>Mode:</b></td> <td width="172"><i>#mode# </i></td> </tr> </table> </CFOUTPUT> <hr> <BR><BR><BR>