Hi, I have a project at work that I need help on. I have couple of questions regarding to my "file manipulation program" and was wondering if anyone could help me. Thanks a lot. I really appreicate it.
About the program: - There is an input folder and an output folder - *.pdf files comes in the input folder waiting to be copied to the output folder for printing - only one pdf file is allowed to be in the output folder at one time - my program has to check if there is any pdf files in the input folder and if there is, check if there is any pdf file in the output folder and if there isn't any move the pdf file to the output folder for print. This program has to be running continously - one point that is important to this program is that, the program needs to check for the "Completeness" of the pdf files in the input folder. THe reason is that when the pdf files get uploaded to the input folder, sometimes it might not be "complete". The reason is, the moment you start uploading a pdf file, you would be able to see that file in the input folder, but it might not be fully uploaded yet (i.e. it might be empty). We can't copy the file to the output folder yet if it is not completely uploaded. - lastly, when a pdf file is done printing in the OUTPUT FOLDER, it will be removed automanticly. (which means my program doesn't have to worry about that part) About the OS: - The OS is Win 2000 My design: Basically the structure of the loops in my program are the following: Loop1: If no *.pdf files in OUTPUT FOLDER If there is *.pdf files in INPUT FOLDER Go through each pdf file(s) in the INPUT FOLDER If the pdf file is "complete" Copy it to the OUTPUT FOLDER and rename it to xxx.tmp rename the xxx.tmp in OUTPUT FOLDER to xxx.pdf rename the xxx.pdf in INPUT FOLDER to xxx.done Go back to Loop1 else sleep for 15 sec Go back to Loop 1 else sleep for 15 sec Go back to Loop 1 My questions: 1. As you can see, my program is going to be running infinitly. Will this be a problem? I will probably make this program as a service on win 2000 so it runs right awway when the computer is turned on. 2. When I check for the "completeness" for the pdf file. I was thinking of trying to open it, if it fails therefore it is "incomplete". Since when the file is uploading, the file is open for Write, and when a file is open for Write, then I shouldn't be able to open it right? Am I right? THank you very much, Kelvin -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]