Newbies fmdave Posted January 16, 2008 Newbies Posted January 16, 2008 (edited) Can't get my head around this... History My application exports two files in XML format and the files are then posted on a ColdFusion powered website. I wish to import these two files into runtime copies of my application (on a regular basis), but due to the nature of the website where the files are hosted, the URL stays the same, but the files move location as they are updated, so I cannot point to an absolute path. e.g http://www.website.com/media.cfm?mediaid=12510 when opened in a browser resolves to http://www.website.com/media/xmlfiles/p/8/myfile.xml As I said, when the files are updated, the old files remains (for rollback purposes) and a new file is created (mediaid remains the same, but now points to the new file location). If I use Import Records from the file menu, select XML Data Source option, select File radio-button and paste the URL http://www.website.com/media.cfm?mediaid=12510 into the File Name box and press Open it will resolve fine and take me to the next step of Import Field Mapping. This is exactly what I want to do under script control, but I cannot. Obviously I want to hide the dialog, but if I leave it open and paste in the URL it works, but I cannot paste it in and expect it to work automatically, as it always fails. Am I missing something here? (Apologies for the length of the post) Edit: the HTTP Request option doesn't work here, hence calling the File dialog. Edited January 16, 2008 by Guest
Newbies fmdave Posted January 17, 2008 Author Newbies Posted January 17, 2008 (edited) Update I can make the URL a target of Web Viewer and see the resulting XML, so can I somehow grab the absolute path to the filename for here? Appreciate any advice guys... Edited January 17, 2008 by Guest
Newbies fmdave Posted January 21, 2008 Author Newbies Posted January 21, 2008 (edited) SOLVED Used GetLayoutObjectAttribute ( "WebViewerName" ; "Source" ) which returned the resolved URL including the target xml filename. Also investigated WGET which turns out to be a very useful utility which downloads the xml file to the local machine. I may actually stick to using WGET as it's proving to be more flexible (thank you Fenton Jones for mentioning WGET in one of your posts). Edited January 21, 2008 by Guest
Recommended Posts
This topic is 6151 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now