Hello
I have a php script that is executed a shell Script after a click.
That works fine.
is it possible that another shell script is executed after a waiting period?
<?php
if ($_GET['run']) {
$script = "sudo /home/pi/midori-restart.sh";
$run=`$script`;
}
?>
<style...
I don't get it sorted yet, at least not as I would like.
Currently I have the problem that I only get one change displayed.
Only from one PC and not from all of them as before.
Hello
Many Thanks
Ok, but i don't know how can i change the Clipboard information.
I have to find out more about that first.
i have this
$Ausgabe = Get-Clipboard
$Ausgabe = $Ausgabe -replace "; SideIndicator==>} @{Name=", "ZZ"
tried, but unfortunately without success.
The "ZZ" was an...
Hello
i would like to design the output like this
Die Datei
\\PC2\Share\123\xyz
Lx_St1.1_EVGV1_Defekte_Deckel_hinten.pvx; LastWriteTime=03/09/2021 08:22:06;
Lx_St1.1_EVGV1_Defekte_Deckel_hinten.pvx; LastWriteTime=03/09/1900 00:00:01
\\PC3\Share\123\xyz...
@Rick998 Many Thanks!!
Yes it helps.
Only the output in the email text is not optimal.
$ref_dir = '\\PC1\Share\123\xyz'
$filefilter = '*.pvx'
$shares = "\\PC2\Share\123\xyz","\\PC3\Share\123\xyz","\\PC4\Share\123\xyz"
$ref = ls "$ref_dir\*" -File -Filter $filefilter -exclude...
...an email with an overview of which files are different on the systems?
The Powershell script:
$ref_dir = '\\PC1\Share\123\xyz'
$filefilter = '*.pvx'
$shares = "\\PC2\Share\123\xyz","\\PC3\Share\123\xyz","\\PC4\Share\123\xyz"
$ref = ls "$ref_dir\*" -File -Filter $filefilter -exclude...
[thumbsup2]
Many thanks.
In the first test, I had the problem that it started a powershell process for me in a continuous loop, so I had to reboot the PC :-)
I have one more question.
I have read here that the paths could also be read from a file
https://stackoverflow.com/questions/53397783/file-watcher-using-windows-powershell-to-monitor-multiple-paths
$paths = Get-Content "D:\abc\Folder_monitored_paths.txt";
foreach ($path in $paths)
is it...
Hello
I ask my question in the Forum and i get an answer.
With this script i get the Filename
Write-Warning 'Change detected:'
$ChangeInformation | Out-String | Write-Host -ForegroundColor DarkYellow
# send email
Send-MailMessage –To "Email@domain.com" `
–Subject...
...# specify the path to the folder you want to monitor:
#$Path = $desktop
$Path = "c:\tmp"
# specify which files you want to monitor
$FileFilter = '*.cfg'
# specify whether you want to monitor subfolders as well:
$IncludeSubfolders = $true
# specify the file or folder properties you want...
you wrote that you changed it with the notepad, I tried it with this one and it works.
Normally I always use notepadd ++ here
Many thanks for the Code!
I will test it.
Ok,
i have only changed the Part of Email in the script for testing.
So i get only a picture and no emails ;-)
# define actions after an event is detected
$writeaction = {
$path = $Event.SourceEventArgs.FullPath
$changeType = $Event.SourceEventArgs.ChangeType
$logline = "$(Get-Date)...
hi mikrom,
ok, in the Powershell console i get no error message ;-)
But i get always 2 Messages when i change one file.
(i open it, change something and save the file)
@mikrom
Many Thanks!!
I test it in the Powershell ISE Console, but i get a error Message:
Start monitoring files: c:\tmp\*.cfg
(press Ctrl-C to stop)
Ausnahme beim Festlegen von "TreatControlCAsInput": "Das Handle ist ungültig.
"
In Zeile:42 Zeichen:1
+ [console]::TreatControlCAsInput =...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.