Windows native and system copy
Nancy Palmquist
nlp at vss3.com
Tue Mar 22 07:15:56 PST 2005
Kenneth Brody wrote:
> Quoting GCC Consulting (Mon, 21 Mar 2005 19:41:46 -0500):
>
>
>>I had created a process that copies a file from one computer to a server
>>and renames the file using the system command.
>> copy upstrack.csv f:\temp\ups032105.txt
>
> [...]
>
>>However, when run from the task manager the first part of the program
>>worked, the copy/rename. However, the import function failed.
>>
>>After talking with Nancy Palmquist, she confirmed what I had suspected.
>>I had placed a sleep 5000 prior to the import. This let the program
>>take a break for 5 seconds before the import ran. With this in place,
>>the program ran perfectly.
>>
>>Nancy has had some conversation with ken about this problem and he has
>>said that sleep isn't necessary. However, Nancy and I feel that, at
>>least in a network/Windows environment, processing returns to the
>>processing table before the new file has had a chance to close. It
>>will exist, but won't be closed and available for import or whatever.
>>
>>By delaying processing those few seconds, it clears the problem.
>
> [...]
>
> While I don't doubt that the sleep fixes the problem on your system, I
> can tell you that this means that your system is broken. Unless you
> tell the O/S to run the copy in background, the copy will be complete,
> the file will be closed, and it will be available for anyone to access,
> prior to it returning. If control returns to filePro before the file
> is actually copied, then either you explicitly told Windows to run the
> copy in background (via "start"), or your system is broken.
Ken,
While I understand you always work in a world where the OS works
perfectly, I also understand that we are talking about Windows and I
have yet to see any Windows version work perfectly. There are always
driver issues, network issues, OS bugs and no matter how many patches
you install it is still broken in one way or another.
So if a small pause gives the wacky OS time to get itself together, then
so be it.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list