Solved

32?!?!?!?!!?

Posted on 1998-11-09
8
193 Views
Last Modified: 2012-05-04
gaah...
im trying to wait for a download on a file in my program
but winnt wont lockup the file when its being downloaded!
why?
0
Comment
Question by:webrage
  • 3
  • 3
  • 2
8 Comments
 
LVL 16

Expert Comment

by:heyhey_
ID: 1177359
haag ??
how do you 'download' the file ? and esspecially how do you save it to disk ???
0
 

Author Comment

by:webrage
ID: 1177360
sorry..
the file is being downloaded to a directory by ftp. My program triggers when a new file apear in the ftp directory! Then I want to wait for the file to be fully downloaded before i do something about it. But i cant see any diffrent(between a normal file and to the file being downloaded) in flags set to the file.
running nt with ntfs!
0
 
LVL 16

Expert Comment

by:heyhey_
ID: 1177361
it seems that this is a question of FTP client. what's your client ? isn't there some other way to work in conjunction with this program.

(Note: maybe you can monitor File I/O activity and wait for the FileClose to be called ??)

0
 

Author Comment

by:webrage
ID: 1177362
hmm.. i dont think its a client dependent problem...
maybe ftp server problem...
but this is thought to be a generall program so it would
be better solve this with code...

 
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 16

Expert Comment

by:heyhey_
ID: 1177363
       it seems that I still can't get the Question
        ok - so you have remote server computer running FTP server
        and local client computer (workstation)

            some program (FTP client) downloads files in 'FTP directory'
            your program triggers when a new file apear in that directory.
            than you want to do something with the file, after it has been fully downloaded.

      so.
      1. the FTP client is the one that (eventually) manages the file locking ...
      2. how is your porogram triggered ?
      3. I proposed to wait till the ftp client executes FileClose from WinAPI ...

      so?

0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 1177364
You can try monitoring len of file and if it is constant
in DELAY sec, can conclusive, that download is ended.
Alex
0
 

Author Comment

by:webrage
ID: 1177365
hmm sorry Alex I have also thought about that, but it is to uncertain..
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 100 total points
ID: 1177366
I see for you 2 possibilities:
1. Use FindFirstChangeNotification: see
http://www.experts-exchange.com/topics/comp/lang/cplusplus/Q.10097580
2. Use utility
  for  File Monitoring(Open/Close/Change Dir ,,,,
http://www.sysinternals.com/filemon.htm

Can be this helps, Alex
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

706 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

21 Experts available now in Live!

Get 1:1 Help Now