Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mapped Drive Path

Status
Not open for further replies.

rittiger15

Technical User
Apr 21, 2003
6
US
I have a database that use cold fusion to create text files of the data. These text files can then be downloaded by users from the server. I used to save the files on a local drive where my code looked like this:

variables.path = "C:\agcomm\cfml\downloads";

However, since our customer recently went to a differnt configuration of the servers, we can no longer use FTP to download the text files. For a solution, the customer mapped a directory (agcommdb) from the production side to a directory on the test side (agcommdb_test). How do I call this logical directory?

I thought it would be:

variables.path = "/agcommdb/cfml/downloads";

Chris
 
Is the "agcommdb" folder visible in the home directory of the test website?

ex: site.com/agcommdb/cfml/downloads/

With what you have that should be the path if it is true. But how are you accessing the file for the user to download? You could use: site.com/agcommdb/cfml/dowloads/myfile.txt and the browser should open the file for display, then user could save it to their HD.

Hope it helps.

xtendscott
Web Site Design | Cryosurgery | Walla Walla Portal
 
xtendscott,

Thanks for your reply. This is what we have right now. We are able to save the files on the production side, but we can't hit the mapped drive so the files are not getting to the test side. I don't think we are getting the path correct. The mapped drive is:

Production side w/agcommdb
Test side w/agcommdb

Supposedly this two directories are mapped together. These files are created with the live data and then they need to be saved to a location that the user can download them from. We have an application in Access that automatically downloads (via FTP) these text files and imports them. There is no user going in manually and downloading these files.


The path we are creating the files to is saved in a variable.

variables.path = "F:\Hosted Sites\ato\w\agcommdb\downloads";

agcommdb is a physical folder on this production server along with a logical folder. I am not sure if that is the problem. How can I set up my variables.path to point directly to the mapped folder?? Also, would it be easier to save the files locally then move them after they are created?

Thanks,
Chris
 
Are you sending them from dev to production with a link?

<a href = "productionsite.com/w/agcommdb>get text</a>

or are you trying to use cffile to get the file? if you're using cffile you'll want to try

path = "\\serverNameOrIP\mappedDrive\"

Keep in mind what you're trying to do here is going to give you problems when you publish to production. You're telling the dev code to look to another server, when you publish you'll have to tell it not to do that. Not tipically how dev >> production is supposed to work.

What I would do is manually copy the files from production to development for testing only. That way your dev code looks at the dev files and the production site will look at the production files with no changing of code.

We've heard that a million monkeys at a million keyboards could produce the complete works of Shakespeare; now, thanks to the Internet, we know that is not true.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top