i want to have 1 text file, and that text file will have like:
myfile1.dll
myfile2.exe
myfile3.php
and i want to be able to access each line separately. because in each line will contain a URL to a file, which will then be downloaded. here is what i have so far:
my code:
now NORMALLY, you would have to do:VB Code:
Private Sub cmdupdatecheck_Click() ' download the updates information text file: DownloadFile "http://www.csscobalt.com/uploads/updated_files.txt", "c:\updated_files.txt" ' open the updated_files.txt file Dim File1Data, File2Data As String Open "c:\updated_files.txt" For Input As 2 Line Input #1, File1Data Line Input #2, File2Data 'take the prefix of the know URL and add the file name at the end, creating a complete URL. Dim File1DataUrl Dim File2DataUrl File1DataUrl = "http://www.csscobalt.com/uploads/" & File1Data File2DataUrl = "http://www.csscobalt.com/uploads/" & File2Data 'make a correct Save Path Dim File1DataUrlSave Dim File2DataUrlSave File1DataUrlSave = App.Path & "upload_files/" & File1Data File2DataUrlSave = App.Path & "upload_files/" & File2Data 'ACTUALLY Download the file: DownloadFile File2DataUrl, File1DataUrlSave DownloadFile File2DataUrl, File2DataUrlSave Close 2, 1 End Sub
DownloadFile "http://www.csscobalt.com/uploads/myfile.php", "c:\myfile.php"
but i can't do that because i won't know the actual file name.
and also i know that my line separation of the txt file code is completely wrong... but it's a start.
can anyone PLEASE help me with this?




Reply With Quote