Creating file in watch directory
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Creating file in watch directory
That is the approach we generally use when we have control. Have program look for the tag file and then import the real file that was created first. No control over the program doing the watch. It does not care about file name, it looks for any file and then loads it.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Creating file in watch directory
Our client uses the the Novell NCP protocol. Will look at your smb2 reference.
Re: Creating file in watch directory
In that case it won't be easy to prevent an error.it looks for any file and then loads it.
If the directory where the file must be saved doesn't exist, will the watching program give an error? If not, you could rename the directory, put your file in it, en then restore the original name to the directory.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Creating file in watch directory
Thanks for the thought,
Not really practical as the watch folder is used by many different individuals. Credit department, Collection Department, anyone who needs to request credit reports. They all expect it to be available at any time. Will monitor and change to using low level file functions instead of memowrit. At least they provide error reporting and you can control.
Not really practical as the watch folder is used by many different individuals. Credit department, Collection Department, anyone who needs to request credit reports. They all expect it to be available at any time. Will monitor and change to using low level file functions instead of memowrit. At least they provide error reporting and you can control.
Re: Creating file in watch directory
I'm wondering why low level functions would resolve this problem. There will always be a moment that the file is created, but still empty. If the watch software reads that file at that particular millisecond, you will have the same problem.
Re: Creating file in watch directory
if you have a lot of RAM : try a RAMDISK on Server which you can share like http://www.dataram.com/
greetings by OHR
Jimmy
Jimmy
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Creating file in watch directory
But was wierd was that the file never appeared to be created as it did not show up in the erased file process that Novell NSS system provides. If I can detect that, I could just retry the process. I see that memowrit does return a success/failure value. I will add a check for that. That may be sufficient.
Re: Creating file in watch directory
I haven't worked with Novell in a long time but this may work:
Create the file in a different folder on the Novell server, then MOVE the file to the watch folder.
In Windows a MOVE only changes an entry in the file allocation table so I see no scenario in which you would end up with an empty file.
I think that Novell has a MOVE that works the same way.
Create the file in a different folder on the Novell server, then MOVE the file to the watch folder.
In Windows a MOVE only changes an entry in the file allocation table so I see no scenario in which you would end up with an empty file.
I think that Novell has a MOVE that works the same way.
The eXpress train is coming - and it has more cars.
-
- Posts: 605
- Joined: Thu Jan 28, 2010 9:11 pm
- Location: Steven Point, Wisconsin USA
- Contact:
Re: Creating file in watch directory
Novell OES (running on a SLES linux server) does support the move command from the workstation. I will just have to determine what API to use. I use the windows copy API's already but will have to search the needed information.