diff --git a/plugins/.gitignore b/plugins/.gitignore index a338201..349f21d 100644 --- a/plugins/.gitignore +++ b/plugins/.gitignore @@ -34,7 +34,6 @@ renamefile_settings.cpython-310.pyc /DeleteMe /ATestPlugin /FileMonitor/working -test_hello_world*.* MyDummyFileFrom_test_script_hello_world.txt ## Ignore Visual Studio temporary files, build results, and diff --git a/plugins/FileMonitor/test_hello_world.bat b/plugins/FileMonitor/test_hello_world.bat new file mode 100644 index 0000000..9c59470 --- /dev/null +++ b/plugins/FileMonitor/test_hello_world.bat @@ -0,0 +1,6 @@ +@ECHO OFF +echo Hello, world from batch script! arg = %* + +echo Hello, world from batch script! arg = %* > %~dp0\\MyDummyFileFromBatchTestFor_FileMonitor.txt + +exit /b 0 \ No newline at end of file diff --git a/plugins/FileMonitor/test_hello_world.py b/plugins/FileMonitor/test_hello_world.py new file mode 100644 index 0000000..5b7b19e --- /dev/null +++ b/plugins/FileMonitor/test_hello_world.py @@ -0,0 +1,14 @@ +import sys, os, pathlib, json + +Args = "" +if len(sys.argv) > 1: + Args = sys.argv[1:] +print(f"StdErr: Hello, world from Python script!\nArgs={Args}", file=sys.stderr) + +testFileToCreate = f"{pathlib.Path(__file__).resolve().parent}{os.sep}MyDummyFileFromPython_{pathlib.Path(__file__).stem}.txt" + +pathlib.Path(testFileToCreate).touch() + +print(f"Hello, world from Python script!\nArgs={Args}") + +sys.exit(0) \ No newline at end of file diff --git a/plugins/FileMonitor/test_hello_world2.cmd b/plugins/FileMonitor/test_hello_world2.cmd new file mode 100644 index 0000000..67793ab --- /dev/null +++ b/plugins/FileMonitor/test_hello_world2.cmd @@ -0,0 +1,6 @@ +@ECHO OFF +echo Hello, world#2 from batch script! arg = %* + +echo Hello, world#2 from batch script! arg = %* > %~dp0\\MyDummyFileFromBatch2TestFor_FileMonitor.txt + +exit /b 0 \ No newline at end of file diff --git a/plugins/FileMonitor/test_hello_world2.py b/plugins/FileMonitor/test_hello_world2.py new file mode 100644 index 0000000..d727901 --- /dev/null +++ b/plugins/FileMonitor/test_hello_world2.py @@ -0,0 +1,14 @@ +import sys, os, pathlib, json + +Args = "" +if len(sys.argv) > 1: + Args = sys.argv[1:] +print(f"StdErr: Hello, world from Python script!\nArgs={Args}", file=sys.stderr) + +testFileToCreate = f"{pathlib.Path(__file__).resolve().parent}{os.sep}MyDummyFileFromPython2_{pathlib.Path(__file__).stem}.txt" + +pathlib.Path(testFileToCreate).touch() + +print(f"Hello, world from Python script2!\nArgs={Args}") + +sys.exit(0) \ No newline at end of file