Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy a file from data on my website
Message
From
29/01/2011 02:46:15
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
28/01/2011 19:06:17
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01497730
Message ID:
01497736
Views:
76
>Hello,
>
>I need to pull information from a website into FoxPro. The information is within a .txt file (comma delimited) on the website server.
>
>Ideally, I'd just like to copy the .txt files on to my hard drive and manipulate them further in FoxPro. When I try to:
>
>copy file "http://www.MYWEBSITE.com/_private/form_results10.txt" to c:\hold\form_results10.txt
>
>I get the error "Invalid path or filename". I tried something else earlier (don't recall what it was) that led me to believe FoxPro was "stuck" within the C:\ drive (something like it couldn't find c:\http://...).
>
>I also tried writing a macro in Excel to open the .txt file there and manipulate it. I'm not sure how to tweak that code to actually work.
>
>If there is a way to just copy the files, that's perfect. If not, help converting the following macro to "FoxSpeak" would be greatly appreciated.

Automating Excel to get a file over HTTP is a bit of an overkill, but it can be done. I'd rather point you to Rick Strahl's website - get wwIpStuff, and look for HTTPGet(), to which you just pass the url and get the file in a string variable, which you then StrToFile() to wherever you want.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform