Skip to content

Releases: ComPlat/ELN_file_watcher

v1.3.1

14 Jun 11:14
Compare
Choose a tag to compare

ELN_file_watcher

Version 1.3.1

Once all files in a subdirectory <CMD arg -src>
(or a file directly in <CMD arg -src>) have not been
modified for about exactly <CMD arg -duration> seconds,
the subdirectory is sent to a remote WebDAV or SFTP server at <CMD arg -dst>.

Important

  1. If you want to run this tool on Windows XP it has to be compiled with go version 1.10.8.
  2. If the tool is used with the SFTP protocol under Windows XP, you must also save a protable
    version of WinSCP (WinSCP)[https://winscp.net/download/WinSCP-5.21.5-Portable.zip] in the same folder as the efw.exe.

Usage

efw -duration <integer> -src <folder> -dst <url>/ -user <username> -pass <password> [-zip]

-name string
    Name of the EFW instance. This name is used to create a working folder in the user home directory. .

-duration [int]
    Duration in seconds, i.e., how long a file must
    not be changed before sent. (default 300)

-src [string]
    Source directory to be watched.

-dst [string]
    WebDAV destination URL. If the destination is on the lsdf, the URL should be as follows:
    https://os-webdav.lsdf.kit.edu/<OE>/<inst>/projects/<PROJECTNAME>/
        <OE>-Organisationseinheit, z.B. kit.
        <inst>-Institut-Name, z.B. ioc, scc, ikp, imk-asf etc.
        <PROJRCTNAME>-Projekt-Name

-pass [string]
    WebDAV Password

-user [string]
    WebDAV user or SFTP user

-type [string: file|folder|zip]
     Type must be 'file', 'folder' or 'zip'. The 'file' option means that each file is 
     handled individually, the 'folder' option means that entire folders are transmitted
     only when all files in them are ready. The option 'zip' sends a folder zipped, only
     when all files in a folder are ready.

-crt (Optional) [string]
     Path to server TLS certificate. Only needed if the server has a self signed certificate.

Setup the efw on a Windows system

  1. Download the efw_run_example.bat, the efw.exe and the task_example.vbs for your system here
  2. Copy the efw_{system}.exe and save it as efw.exe. Additionally, download the efw_run_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the task_example.vbs:
    • "<Full path to run_.bat>" with "C:\Program Files\file_exporter\efw_run_example.bat"
  4. Replace in the efw_run_example.bat:
    • <Path to efw.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip, -name, -transfer, -type
  5. copy the task_example.vbs into the startup directory
    • Hint: Windows Key + R to open run and type shell:startup. This will open Task Scheduler

v1.3

14 Jun 11:01
Compare
Choose a tag to compare

ELN_file_watcher

Version 1.3

Once all files in a subdirectory <CMD arg -src>
(or a file directly in <CMD arg -src>) have not been
modified for about exactly <CMD arg -duration> seconds,
the subdirectory is sent to a remote WebDAV or SFTP server at <CMD arg -dst>.

Important

  1. If you want to run this tool on Windows XP it has to be compiled with go version 1.10.8.
  2. If the tool is used with the SFTP protocol under Windows XP, you must also save a protable
    version of WinSCP (WinSCP)[https://winscp.net/download/WinSCP-5.21.5-Portable.zip] in the same folder as the efw.exe.

Usage

efw -duration <integer> -src <folder> -dst <url>/ -user <username> -pass <password> [-zip]

-name string
    Name of the EFW instance. This name is used to create a working folder in the user home directory. .

-duration [int]
    Duration in seconds, i.e., how long a file must
    not be changed before sent. (default 300)

-src [string]
    Source directory to be watched.

-dst [string]
    WebDAV destination URL. If the destination is on the lsdf, the URL should be as follows:
    https://os-webdav.lsdf.kit.edu/<OE>/<inst>/projects/<PROJECTNAME>/
        <OE>-Organisationseinheit, z.B. kit.
        <inst>-Institut-Name, z.B. ioc, scc, ikp, imk-asf etc.
        <PROJRCTNAME>-Projekt-Name

-pass [string]
    WebDAV Password

-user [string]
    WebDAV user or SFTP user

-type [string: file|folder|zip]
     Type must be 'file', 'folder' or 'zip'. The 'file' option means that each file is 
     handled individually, the 'folder' option means that entire folders are transmitted
     only when all files in them are ready. The option 'zip' sends a folder zipped, only
     when all files in a folder are ready.

-crt (Optional) [string]
     Path to server TLS certificate. Only needed if the server has a self signed certificate.

Setup the efw on a Windows system

  1. Download the efw_run_example.bat, the efw.exe and the task_example.vbs for your system here
  2. Copy the efw_{system}.exe and save it as efw.exe. Additionally, download the efw_run_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the task_example.vbs:
    • "<Full path to run_.bat>" with "C:\Program Files\file_exporter\efw_run_example.bat"
  4. Replace in the efw_run_example.bat:
    • <Path to efw.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip, -name, -transfer, -type
  5. copy the task_example.vbs into the startup directory
    • Hint: Windows Key + R to open run and type shell:startup. This will open Task Scheduler

v1.2

10 Aug 12:44
Compare
Choose a tag to compare

Setup the efw on a Windows system

  1. Download the run_example.bat, the efw.exe and the task_example.vbs for your system here
    • In the following introduction we will assume a 64 bit Windows system.
  2. Copy the efw_win64.exe and the run64_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the task_example.vbs:
    • "<Full path to run_.bat>" with "C:\Program Files\file_exporter\run64_example.bat"
  4. Replace in the run64_example.bat:
    • <Path to efw_win64.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw_win64.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip
  5. copy the task_example.vbs into the startup directory
    • Hint: Windows Key + R to open run and type shell:startup. This will open Task Scheduler

In case it is not working it might be that either the log file or the source directory can not be accessed by the executing user. In this case please make sure the log file and the src dirctory have the correct read & writing permissions.
A tutorial how to set permissions can be found at: Microsoft answers

Turn off UAC (User Account Control)

Alternative setup the efw on a Windows 10 system

  1. Download the run_example.bat and the efw.exe for your system here
    • In the following introduction we will assume a 64 bit Windows system.
  2. Copy the efw_win64.exe and the run64_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the run64_example.bat:
    • <Path to efw_win64.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw_win64.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip
  4. Create a Scheduled Task to trigger at log on.
    • How to create a Scheduled Task:
    1. Using the Windows Key + R to open run and type taskschd.msc. This will open Task Scheduler.
    2. Under the actions panel, you can choose to create a back task or create a task. Click Create Task.
    3. The Create Task screen will appear.
    4. In the Create Task dialog, select the following:
      1. In the General (tab) and select Run with highest privileges
      2. In the Triggers (tab) press the New (button) and add Begin the task, At log on

Full Changelog: v0.1...latest

v1.1

28 Jul 11:41
Compare
Choose a tag to compare

Setup the efw on a Windows system

  1. Download the run_example.bat, the efw.exe and the task_example.vbs for your system here
    • In the following introduction we will assume a 64 bit Windows system.
  2. Copy the efw_win64.exe and the run64_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the task_example.vbs:
    • "<Full path to run_.bat>" with "C:\Program Files\file_exporter\run64_example.bat"
  4. Replace in the run64_example.bat:
    • <Path to efw_win64.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw_win64.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip
  5. copy the task_example.vbs into the startup directory
    • Hint: Windows Key + R to open run and type shell:startup. This will open Task Scheduler

In case it is not working it might be that either the log file or the source directory can not be accessed by the executing user. In this case please make sure the log file and the src dirctory have the correct read & writing permissions.
A tutorial how to set permissions can be found at: Microsoft answers

Turn off UAC (User Account Control)

Alternative setup the efw on a Windows 10 system

  1. Download the run_example.bat and the efw.exe for your system here
    • In the following introduction we will assume a 64 bit Windows system.
  2. Copy the efw_win64.exe and the run64_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the run64_example.bat:
    • <Path to efw_win64.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw_win64.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip
  4. Create a Scheduled Task to trigger at log on.
    • How to create a Scheduled Task:
    1. Using the Windows Key + R to open run and type taskschd.msc. This will open Task Scheduler.
    2. Under the actions panel, you can choose to create a back task or create a task. Click Create Task.
    3. The Create Task screen will appear.
    4. In the Create Task dialog, select the following:
      1. In the General (tab) and select Run with highest privileges
      2. In the Triggers (tab) press the New (button) and add Begin the task, At log on

v1.0

27 Jul 12:47
Compare
Choose a tag to compare

This release is tested in cooperation with the LSDF and as alternative ELNFileServer

v1.3

19 Aug 07:30
Compare
Choose a tag to compare

Setup the efw on a Windows system

  1. Download the run_example.bat, the efw.exe and the task_example.vbs for your system here
    • In the following introduction we will assume a 64 bit Windows system.
  2. Copy the efw_win64.exe and the run64_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the task_example.vbs:
    • "<Full path to run_.bat>" with "C:\Program Files\file_exporter\run64_example.bat"
  4. Replace in the run64_example.bat:
    • <Path to efw_win64.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw_win64.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip
  5. copy the task_example.vbs into the startup directory
    • Hint: Windows Key + R to open run and type shell:startup. This will open Task Scheduler

In case it is not working it might be that either the log file or the source directory can not be accessed by the executing user. In this case please make sure the log file and the src dirctory have the correct read & writing permissions.
A tutorial how to set permissions can be found at: Microsoft answers

Turn off UAC (User Account Control)

Alternative setup the efw on a Windows 10 system

  1. Download the run_example.bat and the efw.exe for your system here
    • In the following introduction we will assume a 64 bit Windows system.
  2. Copy the efw_win64.exe and the run64_example.bat to the target directory on your target machine
    • In the following we use the example "C:\Program Files\file_exporter".
  3. Replace in the run64_example.bat:
    • <Path to efw_win64.exe> with "C:\Program Files\file_exporter"
    • Setup all parameter (hint: use efw_win64.exe -h):
    • -dst, -src, -crt, -duration, -user, -pass, -crt, -zip
  4. Create a Scheduled Task to trigger at log on.
    • How to create a Scheduled Task:
    1. Using the Windows Key + R to open run and type taskschd.msc. This will open Task Scheduler.
    2. Under the actions panel, you can choose to create a back task or create a task. Click Create Task.
    3. The Create Task screen will appear.
    4. In the Create Task dialog, select the following:
      1. In the General (tab) and select Run with highest privileges
      2. In the Triggers (tab) press the New (button) and add Begin the task, At log on

Full Changelog: v0.1...latest

v0.1

17 Jun 18:59
Compare
Choose a tag to compare
v0.1 Pre-release
Pre-release

This release is tested in cooperation with ELNFileServer