473,396 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

a little help please...

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,
rodchar
Nov 21 '05 #1
3 981
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
"rodchar" wrote:
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,
rodchar

Nov 21 '05 #2
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
Nov 21 '05 #3
thanks for the help.

"rodchar" wrote:
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,
rodchar

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: rmn | last post by:
Hi, I'm looking for the translation betwen the color spaces, but I must be mistaken with the methods to use, losing the values. Please, I need a little help of a "coloured guru"....
3
by: Ron Stephens | last post by:
I posted to my web site a fun little program called merlin.py today. Please keep in mind that I am a hobbyist and this is just a little hack, if you look at the code you will see that it is still...
2
by: hicham | last post by:
Hi, I am looking for help, i would like to know how can i use the endian.h and config.h to convert compiled files under solaris from BIG-ENDIAN to compiled files LITTLE-ENDIAN. I am working...
2
by: Slash | last post by:
I often do a lot of text-mode programming in Linux and wanted to use colors in text mode, and found the ncurses library needlessly complex for small applications. So I wrote my own little header to...
8
by: Perception | last post by:
Hello all, If I have a C-like data structure such that struct Data { int a; //16-bit value char; //3 ASCII characters int b; //32-bit value int c; //24-bit value }
2
by: Daniel | last post by:
I'm new to .Net and all of its abilities so I hope this makes sense. Basically I'm confused on when is the appropriate time to use web forms controls vs. regular HTML. For example in ASP...
13
by: junky_fellow | last post by:
Hi guys, I need to convert a big endian integer to little endian integer. (the integer is 4 bytes in size on my implementation). I came up with the following code. I need your comments on...
3
by: ThaDoctor | last post by:
Hi. I am quite new to C++ so I think I would ask here what I am doing wrong with this code. I am writing a little game in a text console, but here is something that is in no way related to the...
23
by: Niranjan | last post by:
I have this program : void main() { int i=1; if((*(char*)&i)==1) printf("The machine is little endian."); else printf("The machine is big endian."); }
3
by: Ethan Furman | last post by:
len wrote: I've never had the (mis?)fortune to work with COBOL -- what are the files like? Fixed format, or something like a dBase III style? I
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.