Solved

Storing and accessing an external list of files that need to be transfered.

Posted on 2004-09-14
3
134 Views
Last Modified: 2010-05-02
I have created an app that uses mscomm to dial an isp, then it starts a secure ftp client, and transfers a zip file that is created nightly.  I have finished testing my app but i see problems arising in the future.  My app will be used in 30 different locations spread pretty far apart.

So just stopping by each store to update something is not an option.  
I am running pcanywhere in all my stores but i want this to be as automated as possible without using pcanywhere.(its for remote support only)

Thinkin of using a file that i can place in the home directory of each store (on my ftp server)  when an update is neccesary.  Have the program (running in each location) check if updated file exists(on ftp server), and if so download it and use the updated list for uploading to my server.  

The part i need assistance with is, how to access and store the list of files needed to be transfered, and what type of file will accomplish this.  The number of files to transfer could be different day to day.
Code examples are appreciated!

using vb6 in win95 through win2000 enviroments.
using the transfer engine from cuteftp pro 6.0

If there is a better or more efficient way to accomplish this let me know.


0
Comment
Question by:SeanB43
3 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12062504
I've read this several times and I'm still not sure what you need. Under such circumstances I'd normally not post, but no-one else has commented, so at least I can let you know that your question is hard to understand.

You have created an application the uses ftp to upload or download a zip file. You now need to download some other file(s) day by day.

You appear to have all that is necessary.

If  your new requirement is for more that one file, you could zip them all together. But if that is unacceptable and you need a list, there is no reason that the list couldn't be a text file.
0
 

Author Comment

by:SeanB43
ID: 12064218
I appreciate the response.

Copied from original question

---The part i need assistance with is, how to access and store the list of files needed to be transfered, and what type of file will accomplish this.  The number of files to transfer could be different day to day.
Code examples are appreciated!-----

The text file usage is the part i dont understand.

I am a beginning programmer that has learned vb6 backwards. (just playing with code until i understood it)
The problem is there are some, probably simple, things that i dont understand how to use.
Namely using a text file for storing information that a vb6 app can use and how to make it all work.

Hope that clarifies my question.

Sorry bout the confusion.



0
 
LVL 13

Accepted Solution

by:
Michael_D earned 500 total points
ID: 12067206
Try this :

Dim fs As Object, f As Object, ts As Object
Dim s As String

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile("C:\List.txt")
Set ts = f.OpenAsTextStream(1, -2)

Do While ts.AtEndOfStream = False
    s = ts.ReadLine
    ' Here goes your code:
    ' ex. TransferFile(s)
Loop

0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now