January 16, 200818 yr Newbies 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, 200818 yr by Guest
January 17, 200818 yr Author Newbies 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, 200818 yr by Guest
January 21, 200817 yr Author Newbies 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, 200817 yr by Guest
Create an account or sign in to comment