Groups | Blog | Home
all groups > vb.net > february 2005 >

vb.net : a little help please...



rodchar
2/14/2005 10:53:01 PM
hey all,

i have a task to automate a simple process of once a week downloading a
zipped file (updated weekly but given the same file name) from a website and
processing the file.

How can i make sure that the next file my app tries to download, isn't a
file it's already processed?

I was thinking maybe rename the zipped file after it's been process and the
next time the file is downloaded to do some sort of object comparison. I'm
not even sure this is even possible or if there's better ways. Please advise.

thanks,
Jorge Serrano [MVP VB]
2/14/2005 11:09:02 PM
Hi,

you have a lot possibilities.

You can use a XML or Ini file with the last file processed.
ou can use a CRC32 function to know if that file has been processed.
You can store in database the information about the last file received and
which has been processed...

....and rename the file processed of course.

What's is better?. I am not sure, but you can use whatever action or combine
some of them. I suggest rename the file. Is the action more easier. In other
case, use an ini file to store the last file processed is other good
possibilitie.

I hope that helps.

Kind regards,

Jorge Serrano Pérez
MVP VB.NET


[quoted text, click to view]
Cor Ligthert
2/15/2005 9:26:54 AM
Rodchar,

Depends if it is downloading using FTP or HTTP. However, from both you can
get the date it is created/changed.

By setting this date in the registry (a seperate file is for me overdone in
this) you can just check if you have it already.

I would not change the name, just set the date in the name when downloading.
There is no need to use the original name you know.

I think that this is the way I would go in your situotion, Of course based
on the information we have from you now.

I hope this helps?

Cor

rodchar
2/15/2005 12:47:03 PM
thanks for the help.

[quoted text, click to view]
AddThis Social Bookmark Button