If you're D3 is running on a Linux system, Warwick's suggestion can be achieved using inotify which Linux offers and which will sort out the directory monitoring for you. The other thing I've done when using a watched directory is to have D3 write the file to be transferred and then, when it's done, write an empty (or very small file) that the monitoring process looks for as the trigger to start the transfer. That way you can be sure that the main file is complete.
So, for example, if D3 writes out a file called mytransfer.txt, have it subsequently write a file called mytransfer.done and have the monitoring process run once it sees the ".done" file appear (and then delete both when the transfer has completed).
------------------------------
Martin Shields
Senior Technical Consultant
Meier Business Systems PTY LTD
Carnegie VIC AU
------------------------------
Original Message:
Sent: 08-31-2023 18:18
From: Warwick Dreher
Subject: File transfers
Hi Alex,
something I did years ago for a client who had salesmen send in orders remotely was to scan a directory for the appearance of a file, then process the file and delete it.
You can do something like this to transfer between Windows and Linux.
Remember to have sufficient delay (say 1/2 to 1 minute) between the appearance of the file and processing it, otherwise you may end up with an empty file and errors.
Probably the simplest solution is to have a Windows / D3 directory shared across the network and map it from your Linux Desktop.
Create a specific directory on the Windows/D3 system and network share it. In the D3 account, create a super Q-pointer to that directory.
This will also work no matter the desktop environment.
Regards,
Warwick
------------------------------
Warwick Dreher
Warwick Dreher
Croydon AU
Original Message:
Sent: 08-25-2023 02:19
From: Alex Polglaze
Subject: File transfers
Periodically I have to transfer a single file, usually .txt, from D3 to the Desktop. There is a function in SB+ to do this to a Windows Desktop environment, but I want to transfer the file to a Linux Desktop. I have looked at scp, but can't quite understand the source path from the D3 partition. Any ideas or other suggestions welcome. Once I get it working, I intend to establish it as a script in SB+ to be used multiple times. Thanks. Alex
------------------------------
Alex Polglaze
The Book-Keeping Network
Perth Western Australia
+61419 776 348
apolglaze@book-keepingnetwork.com.au
https://www.book-keepingnetwork.com.au/
------------------------------