PubfilegetFile locks files under Win2000

I’m having this recurring issue with the getFile service on NT. It appears that the service locks the file preventing any other process from deleting the file. I need to reboot the server to release the lock. As far as I know this does not occur on UNIX.

Has anyone else experienced this and can offer a solution??? I really dont want to use FTP services to the same box im running services on, that doesnt make much sense…

Hi Jim,

If you load the file as bytes then there wouldn’t be any problem in deleting the file after load. But if you load as stream then the input file is still referenced and that’s why you couldn’t delete it. Once you consume the stream (e.g. streamToString) then the reference is removed and now you can delete the input file.

Please correct me if I am wrong.

HTH
Karthi

Matthew, you da man!!!

Thanks to both of you for the quick answers… We needed to use the loadAs stream to prepare it for the TN send service but we still needed to delete the file after sending to TN and this was killing us.

Also if you install the new PSUtilities package from WM advantage there is a closeStream service that does the same thing Matt’s service does.