As a Coldfusion developer, have you ever needed to use <CFdirectory> or <CFfile> on another network server or shared folder, other than the Coldfusion server? Trying to copy, move, delete or just check on files on another company server has always been an issue.
The problem with not being able to access a shared/mapped drive from another server starts with the installation of Adobe Coldfusion.
The typical install, set's the service, "Coldfusion 8 Application Server", and all it's companion services as a "Local System Account". .
The first step would be changing this to the admin account used to login to the server.
1. Login to the web server.
2. Right click on My Computer
3. Click on the plus sign, next to "Services and Applications"
4. Click on "Services" Look on the right side panel of the list of services. Look for "Cold Fusion 8 Application Server", or the version Coldfusion you are running. You should see in the "Log On As" column, "Local System"
5. Right click on this service, and select "Properties".
6. Click on the "Log On" tab and select the radio button, "This account". Click on "Browse" button. The "Locations" should be the server name. In the Object box, you want to select the admin user account, used to logon, or type the user name.
7. Restart the server.
Once the Service, "Log On As" has been changed to the admin account used to log on to the web server, you can map to a shared network drive. Once the network drive is mapped, you can use this in your Coldfusion applications.
Let's say I mapped "//172.16.0.75/support/" to drive letter T: and there are PDF files in a folder called "output". I want to use <CFdirectory> to list those files.
<cfdirectory directory="\\172.16.0.75\support\output\" name="checkforpdf" action="LIST" filter="*.pdf" sort="name" listinfo="name">
NOTE: On the Network server you want to map to, you need to set-up a user on that server, with the same username as the username used on the Coldfusion server .
Other ColdFusion Articles
- Adobe Coldfusion Tip For Finding Duplicate Records In SQL Database
- Coldfusion: allowing max file size when uploading
- ColdFusion: Monitor Hard Drive Space And Email Alert
- Coldfusion SQL Tips: Creating Tables, Backup, Fields
- Coldfusion Programming: Accessing a shared network drive
- Coldfusion: Encrypting and Decrypting Data
- Adobe Coldfusion Help: Query To Spreadsheet
- ColdFusion: Upload a pipe delimited file and insert into SQL table
- Coldfusion programming: How to submit muliple records at the same time that have the same field name
- How To Upload Multiple Files With ColdFusion
- Indian Motorcycle Online Portal - GeorgiaBagger.com
Indian Motorcycle Portal for Product Reviews, Motorcycle Events, Indian Motorcycle Forum,Indian motorcycle classifieds, Indian Motorcycle Service Manuals, Indian motorcycle history, Indian Motorcycle Riders Group Registry,Indian Motorcycle News