Advertisement

08.15.2007 at 09:25AM PDT, ID: 22764650
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

ColdFusion CFFILE CFDIRECTORY Trying To Copy Files From One Server To Another

Tags: coldfusion, copy, cffile, server, another
I'm trying to copy files from one server to another.  I'm using ColdFusion.  I have a CFM page set up that reads (and outputs the info to the screen so I can see it)  the files from a particular directory using CFDIRECTORY and filters the list to only include CFM pages. Then I CFLOOP over the reults and inside that loop have a CFFILE that copies the files from one directory to another.  Yea! It works.  However, I don't want to copy these files to a directory on the same server anymore.  The new requirements are to have them copied to another server.  How exactly do I do that WITH MY existing code?  Meaning what can I do to the DESTINATION attribute.

Example that works from server to same server:
<CFDIRECTORY Directory= "#GetDirectoryFromPath(GetTemplateFromPath())#" NAME="MyDirectory" ACTION="List" FILTER="*.cfm">
<CFTABLE QUERY="MyDirectory" HTMLTABLE COLHEADERS>
   <CFCOL HEADER="Name" TEXT="#Name#">
   <CFCOL HEADER="Type" TEXT="#Type#">
   <CFCOL HEADER="Size" TEXT="#Size#">
</CFTABLE>
<CFLOOP QUERY="MyDirectory">
   <CFFILE ACTION="Copy" SOURCE="c:/Blah" DESTINATION="c:/Blah/BackUp/" NAMECONFLICT="Overwrite">
</CFLOOP>
Start your free trial to view this solution
Question Stats
Zone: Web Development
Question Asked By: FSUKXAZ
Solution Provided By: section25
Participating Experts: 3
Solution Grade: B
Views: 132
Translate:
Loading Advertisement...
08.15.2007 at 10:28AM PDT, ID: 19701821

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.15.2007 at 11:20AM PDT, ID: 19702345

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.15.2007 at 11:30AM PDT, ID: 19702431

Rank: Guru

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.19.2007 at 05:16PM PDT, ID: 19727489

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
08.21.2007 at 08:55AM PDT, ID: 19738955

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
09.11.2007 at 08:59AM PDT, ID: 19869769

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
08.15.2007 at 10:28AM PDT, ID: 19701821

Rank: Guru

you can use cffile to write the files to directories on other server on your network by changing the user that coldfusion server runs from the system account to an account that has permissions to access the network drive. This can be done in the services panel.
 
08.15.2007 at 11:20AM PDT, ID: 19702345
I'm not sure I understand, can you be a little more specific with actual steps.
 
08.15.2007 at 11:30AM PDT, ID: 19702431

Rank: Guru

by default coldfusion server runs on the local system account. this account does not have access to network resources such as remote printers or file servers. To make it so cffile can access directories on other computers on the network log into windows on the server then go to:
 control panel>administrative tools>services
right click on each of the coldfusion services and click properties
then on the Log On tab select "This Account" and then enter the login creditials for a user account that has access to the file server.
save the settings and restart the services.

you should then be able to use cffile to acces mapped network drives.

 
08.19.2007 at 05:16PM PDT, ID: 19727489
I dont know how you have setup the servers. But we had a similar situation.

We have 4 webservers. Say A, B, C, D
Users upload images to server D. Editors approve some images and delete the rest. A scheduled job runs and picks up all the latest approved images and moves it to A,B,C.

But internally what it does is, it goes through the database picks up the approved the details of the approved images like filename, type, size etc. We then used a CFFTP to move files through servers A,B,C. We had created an account with permissions for coldfusion to move files. We were just moving files from images folder on D to images folder on A,B,C.

You could use CFDirectory to do the same thing.

1. Pick the details of the folder & files
2. Run through a loop
3. Use CFFTP to move files through different severs (assuming you are passing paths and other stuff properly. Also make sure that CF has the permission to move files to the appropriate folders on all servers)

Its easy to move files from under one folder to another, but make sure that the paths change accordingly when you move folders & files



 


 
08.21.2007 at 08:55AM PDT, ID: 19738955
I've had the same problem for a long time now. The only way I have found to do this without changing the account that CF runs under (because that is not always a viable solution especially when your passwords change every 90 days), is to share the destination drive (open to Everyone unfortunately) and then use the UNC name in the destination:

<cffile action=write destination="\\fileserver1\cdrive\folder">

I hope one day there is a better solution from CF.
       
Accepted Solution
 
09.11.2007 at 08:59AM PDT, ID: 19869769
We are in a military environment and passwords do expire every 90 days so the last solution may work best.  The servers are in a secure network anyway  so perhaps that would be best.
 
 
20080236-EE-VQP-29 / EE_QW_2_20070628