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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CF Browse to retrieve filename & path, then convert to URL 1

Status
Not open for further replies.

SherryS

Programmer
Jul 27, 2001
4
US
Hi.
I am working on a web based data Catalog that stores 'metadata' about data sets (kind of like an electronic version of a library card catalog). I want the user to be able to Browse a file server (that I know will be mapped to the user), and allow them to start at the top of the project directory, drill down & find the file they are cataloging, and I want to grab the full path & name, but then I need it in a url form, with not the mapped drive, but by the server name, i.e //dataServer/projectData/topLevelDirectory/filename.ext.
This I will store as a link, so the data can be easily revisted later.

Thansk so much! If you have any suggestions for me.

Sherry

ssmith@pirnie.com
 
I'm not sure how the users are getting the file - I am assuming a html file upload?? If this is the case then could you not use #Replace(string,substring1,substring2)#, with the string being the value within the file upload text field, substring 1 being the mapped drive and substring 2 being the name of the server?
 
Take a look at the ExpandPath and the GetDirectoryFromPath functions in ColdFusion. They take a relative path, and convert it to the server path. - tleish
 
tleish thank-you.
happy.gif


One more question...
I want to be able to browse a directory on a drive that I know the user is mapped to, and let the user select a filename from the directory listing to document the full path & filename in the application am writing. I want exactly what CFFILE does, except I don't want to upload a file or read it, just grab the name and store it in a db table (that way I also know it exists).
Do you know is there a way to use CFFILE to do the browsing part for me only, or do I need to do a CFDIRECTORY, & put the directory output into a CFSELECT?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top