Fetch files from Internet

wazza

Registered User.
Local time
Yesterday, 22:47
Joined
Apr 23, 2004
Messages
104
Hi

Is it possible to enable a user to simply press a button, with some magic - files are downloaded from a web address?

i have no knowledge of whether this is possible.... can anyone provide sources for info or an example...??

regards
 
Its possible allright and depending on some variables its even quite easy... or quite hard.
Most Important question: Do you know the filenames you want?

Regards
 
the filename IS likely to change!

I think the files will always be on the same address,
its a user account type structure where your favourites files are loaded and you select the file and download.

Because i download so many files i wanted to somehow automate this process.. is this possible using VBA in access?

regards
 
the file names will change - they tend to use a fixed name and a variable number which seems to increase after each download.

i.e. 'download-00902.txt'

so i could attach a varibale string to get the name of the file
 
The problem with FTP is that you cannot do something like:
Get *.txt
You would need to have some idea of the filenames, so if they increment you can extrapolate the name, but the trick is that it has to be the exact name, if not it will create a new file...

I create a text file like so:
open IPnr
UserName
passWord
cd SomeFolder\SomeOther\Folder
get download-00902.txt
get download-00903.txt
bye
Save it somewhere, e.g. C:\ and name it ftpScript.txt

Then do a shell:
shell("ftp -s:C:\ftpscript.txt")

This is the easy way, providing you can "predict" the name. If the file is not there, a new (empty) file will be created on your destination folder.

Regards & GL
 
namliam said:
The problem with FTP is that you cannot do something like:
Get *.txt
Don't know that much about ftp, but what about mget? It might not be all that useful without some way to narrow down the filenames, but it could be useful.
 
Do you have some kind example.... so i can get an idea of sntx etc

or provide some commentry on what those instructions are doing..

_______________________
'open IPnr (is this the point where u specify the internet address)

'username, password - my accounts will request user name and password - can i bypass these if the code contains the password, so the user isnt prompted?

shell, i will need to look into this, what does this do?

Rgrds
 
i am also downloading csv as well as txt.. will this effect the shell..?
 
'open IPnr (is this the point where u specify the internet address)
Yes replace the text IPnr by some real ip number

'username, password - my accounts will request user name and password - can i bypass these if the code contains the password, so the user isnt prompted?
If you enter the proper Username and password it will not prompt no. Prompting would also need you to check if the user has entered the username/pw....Remeber tho the Username and PW are in plain text so anyone can read.... I kindoff make it harder for the user to get at that by setting the script.txt to attrib +h (hidden) this makes it invisible to the "average" user.

shell, i will need to look into this, what does this do?
Shell starts a program, you can use it to start a dos program like here or excel if you like to...

i am also downloading csv as well as txt.. will this effect the shell..?
No, it will simply have impact on the script. Remember you need to know the FULL file name. So simply add:
Get SomeFile_Date.csv
to the text file....

Don't know that much about ftp, but what about mget?
What is mget?

Regards
 

Users who are viewing this thread

Back
Top Bottom