×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

check multiple files (Moved the Post from VBScriptto here)

check multiple files (Moved the Post from VBScriptto here)

check multiple files (Moved the Post from VBScriptto here)

(OP)
Hello

i have postet here https://www.tek-tips.com/viewthread.cfm?qid=180842... an question and there mikrom posted a powershell solution to me.
So I'm moving this to here.

I would like to check several files, ideally from several PCs, for changes and then receive a notification.
after some googling I have this script

CODE --> Powershell

Add-Type -AssemblyName PresentationFramework
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = "c:\tmp\tk"
$watcher.Filter = "*.cfg"
$watcher.IncludeSubdirectories = $true
$watcher.EnableRaisingEvents = $true
$null = Register-ObjectEvent $watcher "Changed" -Action {Send-MailMessage –To "Email.Adress@domain.com" –Subject "CFG DATEI GEÄNDERT!" –Body "CFG Datei wurde geändert!" –SmtpServer "smtp.com" –From "noreplay@domain.com" -encoding ([System.Text.Encoding]::UTF8)}
while ($true) {sleep 10} 

it works, only I always get two email's.
But i don't understand why

Can you tell me why?
And how can I query multiple paths ?!
Because I would like to be able to query several PCs

And when i edit the script to open a Picture, i get multiple E-Mails

CODE --> Powershell

Add-Type -AssemblyName PresentationFramework
$watcher = New-Object System.IO.FileSystemWatcher
$watcher.Path = "c:\tmp\tk"
$watcher.Filter = "*.cfg"
$watcher.IncludeSubdirectories = $true
$watcher.EnableRaisingEvents = $true
$null = Register-ObjectEvent $watcher "Changed" -Action {Send-MailMessage –To "Email.Adress@domain.com" –Subject "CFG DATEI GEÄNDERT!" –Body "CFG Datei wurde geändert!" –SmtpServer "smtp.com" –From "noreplay@domain.com" -encoding ([System.Text.Encoding]::UTF8)}
$null = Register-ObjectEvent $watcher "Changed" -Action {Invoke-Item "C:\Users\username\Documents\test.jpg"}
while ($true) {sleep 10} 

I hope that someone here can explain or help me, why I get several emails here, although only one file changes.
And of course how I could check several PCs

Many Thanks

RE: check multiple files (Moved the Post from VBScriptto here)

It wasn't mikrom that posted the powershell suggestion

RE: check multiple files (Moved the Post from VBScriptto here)

Quote (sugram)


it works, only I always get two email's.
But i don't understand why

Can you tell me why?

It's probably because you experimented with the script and so you started your script twice. If you run the script once again, you will get 3 emails.
If you think, that you finished the script with Ctrl-C then it's not true - it's still running.
Look how many powershell processes are running and kill those which are unnecessary.

RE: check multiple files (Moved the Post from VBScriptto here)

I found out, that after activating System.IO.FileSystemWatcher with Register-ObjectEvent, the files are being monitored until deactivating it with Unregister-Event - even if I end the script with Ctrl-C

RE: check multiple files (Moved the Post from VBScriptto here)

>deactivating it with Unregister-Event

Hence the commented out line in my original illustrative idea in the original thread smile

RE: check multiple files (Moved the Post from VBScriptto here)

I found very nice example here:
https://dotnet-helpers.com/powershell/how-to-monit...
I adapted it a little bit (using several other sources). Now it works great for me.
Here it is - you can try it too:

CODE

$filewatcher = New-Object System.IO.FileSystemWatcher
# folder and file types to monitor
$path = "c:\tmp\"
$filter = "*.txt"
$filewatcher.Path = $path
$filewatcher.Filter = $filter
# include subdirectories $true/$false
$filewatcher.IncludeSubdirectories = $true
$filewatcher.EnableRaisingEvents = $true  
 
# define actions after an event is detected
$writeaction = {
  $path = $Event.SourceEventArgs.FullPath
  $changeType = $Event.SourceEventArgs.ChangeType
  $logline = "$(Get-Date), $changeType, $path"
  # write to logfile
  Add-content "C:\tmp\FileWatcher_log.log" -value $logline
  # write to console
  Write-Host $logline
  # send email
  Send-MailMessage –To "email.adress@domain.com" `
                   –Subject "Event on file: $path" `
                   –Body $logline `
                   –SmtpServer "smtp.com" `
                   –From "noreplay@domain.com" `
                   -encoding ([System.Text.Encoding]::UTF8)
}    
# subscribe to events which should be watched
Register-ObjectEvent $filewatcher "Created" -Action $writeaction
Register-ObjectEvent $filewatcher "Changed" -Action $writeaction
Register-ObjectEvent $filewatcher "Deleted" -Action $writeaction
Register-ObjectEvent $filewatcher "Renamed" -Action $writeaction

# write info
Write-Host
Write-Host "Start monitoring files: $path$filter"
Write-Host "(press Ctrl-C to stop)"
Write-Host

# Ctrl+C is treated as ordinary input
[console]::TreatControlCAsInput = $true

$stepCounter = 0
while ($true) {
  sleep 1
  # if Ctrl-C is pressed
  if ($Host.UI.RawUI.KeyAvailable -and `
     (3 -eq [int]$Host.UI.RawUI.ReadKey("AllowCtrlC,IncludeKeyUp,NoEcho").Character)) {
    # cancel all event subscriptions in the session
    Get-EventSubscriber -Force | Unregister-Event -Force
    # write info
    Write-Host "`n"
    Write-Host "End of monitoring." -Background DarkRed
    # exit loop
    break;
  }
} 

RE: check multiple files (Moved the Post from VBScriptto here)

Hello Strongm,
Thank you very much for showing me the right way with the PowerShell !

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
@mikrom
Many Thanks!!

I test it in the Powershell ISE Console, but i get a error Message:

CODE -->

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 = $true
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetti 
I ignore the Message and change one file and Save it.
I also get 2 e-mails here, although I have only one Powershell open.

CODE -->

Start monitoring files: c:\tmp\*.cfg
(press Ctrl-C to stop)

Ausnahme beim Festlegen von "TreatControlCAsInput": "Das Handle ist ungültig.
"
In Zeile:41 Zeichen:1
+ [console]::TreatControlCAsInput = $true
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], SetValueInvocationException
    + FullyQualifiedErrorId : ExceptionWhenSetting
 
02/18/2021 07:32:00, Changed, c:\tmp\TK\205.cfg
02/18/2021 07:32:00, Changed, c:\tmp\TK\205.cfg

PS C:\Windows\System32\WindowsPowerShell\v1.0> 

RE: check multiple files (Moved the Post from VBScriptto here)

Hi sugram,
I wrote it in ISE, but tested it directly on powershell command line. When I run it now on command line it runs nice. But when I try it in ISE, I get the same error as you. I don't know now, where the error in ISE come from, try it on powershell command line.

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
hi mikrom,

ok, in the Powershell console i get no error message winky smile
But i get always 2 Messages when i change one file.
(i open it, change something and save the file)

RE: check multiple files (Moved the Post from VBScriptto here)

Here I found why the ISE error like above comes out:
https://social.technet.microsoft.com/Forums/script...
It's because, when powershell starts then conhost.ese will be started automatically, but ISE does not start it.




So now a I have this workaround:
Before starting the script in ISE, I execute on the powershell console in ISE a command which starts conhost.exe. It is for example ping as described in the link above.
After executing ping on powershell console in ISE, the script runs without error - here is my output:

CODE

PS U:\> ping

Usage: ping [-t] [-a] [-n count] [-l size] [-f] [-i TTL] [-v TOS]
            [-r count] [-s count] [[-j host-list] | [-k host-list]]
            [-w timeout] [-R] [-S srcaddr] [-c compartment] [-p]
            [-4] [-6] target_name

Options:
    -t             Ping the specified host until stopped.
                   To see statistics and continue - type Control-Break;
                   To stop - type Control-C.
    -a             Resolve addresses to hostnames.
    -n count       Number of echo requests to send.
    -l size        Send buffer size.
    -f             Set Don't Fragment flag in packet (IPv4-only).
    -i TTL         Time To Live.
    -v TOS         Type Of Service (IPv4-only. This setting has been deprecated
                   and has no effect on the type of service field in the IP
                   Header).
    -r count       Record route for count hops (IPv4-only).
    -s count       Timestamp for count hops (IPv4-only).
    -j host-list   Loose source route along host-list (IPv4-only).
    -k host-list   Strict source route along host-list (IPv4-only).
    -w timeout     Timeout in milliseconds to wait for each reply.
    -R             Use routing header to test reverse route also (IPv6-only).
                   Per RFC 5095 the use of this routing header has been
                   deprecated. Some systems may drop echo requests if
                   this header is used.
    -S srcaddr     Source address to use.
    -c compartment Routing compartment identifier.
    -p             Ping a Hyper-V Network Virtualization provider address.
    -4             Force using IPv4.
    -6             Force using IPv6.


PS U:\> C:\00_mikrom\Work\sugram.ps1

Id     Name            PSJobTypeName   State         HasMoreData     Location             Command                 
--     ----            -------------   -----         -----------     --------             -------                 
1      4d13aac3-b15...                 NotStarted    False                                ...                     
2      b54d0be9-1d3...                 NotStarted    False                                ...                     
3      9ea162b9-fe0...                 NotStarted    False                                ...                     
4      4e497f6d-120...                 NotStarted    False                                ...                     

Start monitoring files: c:\tmp2\*.txt
(press Ctrl-C to stop)

02/18/2021 09:51:44, Created, c:\tmp2\sugram_05.txt
02/18/2021 09:51:50, Deleted, c:\tmp2\sugram_05.txt

PS U:\> 

RE: check multiple files (Moved the Post from VBScriptto here)

Quote (sugram)


But i get always 2 Messages when i change one file.
Maybe you have opened the ISE, where you tried the script before, so still 2 instances are running.
Close everything, i.e: ISE, powershell command window, maybe restart your computer.

Then when you open powershell command window again and run the script once, then you should get only one message for every change. Then when you stop the script with Ctrl-C and run again, then again only one message. If I work hygienic at this way with the Powershell beast then it works fine for me.

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
Hi Mikrom


i think my Computer hates me.
I reboot my pc and open one Powershell window, and run the script.
And i get 2 messages :(


RE: check multiple files (Moved the Post from VBScriptto here)

I don't know, try this: On the powershell console where your script runs, stop it and look at the subscribed events with the command

CODE

Get-EventSubscriber -Force 
and then end all subscriptions with:

CODE

Get-EventSubscriber -Force | Unregister-Event -Force 

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
Hi mikrom,

Many thanks for your help!

i don't know what do my PC.
The results you can see here.

RE: check multiple files (Moved the Post from VBScriptto here)

I don't understand what's going wrong.
Are you using the exact same script as I posted above (only with changed email and smtp)?

You need to find out where the 2 messages come from:
Stop the script.
Then change the file to see if you get the email, that would mean that the other instance of the script is elsewhere running ..
Or modify the message in the script, then run it and change the file again, to see if exact the same two messages comes out, or if the old and new message come out ...

RE: check multiple files (Moved the Post from VBScriptto here)

You only try to change the file. Maybe it's something wrong how you change the file, for example when i press quickly two times Ctrl-S in notepad, the file changes two times and I get two messages.
Try what happens if you create a file and if you delete a file: if you then get 2 create and 2 delete messages too, or only 1 ?

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
Ok,

i have only changed the Part of Email in the script for testing.
So i get only a picture and no emails winky smile

CODE --> Powershell

# define actions after an event is detected
$writeaction = {
  $path = $Event.SourceEventArgs.FullPath
  $changeType = $Event.SourceEventArgs.ChangeType
  $logline = "$(Get-Date), $changeType, $path"
  # write to logfile
  Add-content "C:\tmp\FileWatcher_log.log" -value $logline
  # write to console
  Write-Host $logline
  # send email
  #Send-MailMessage –To "Email@domain.com" `
  #                 –Subject "Event on file: $path" `
  #                 –Body $logline `
  #                 –SmtpServer "smtp.com" `
  #                 –From "noreplay@domain.com" `
  #                 -encoding ([System.Text.Encoding]::UTF8)
  Invoke-Item "C:\Users\username\Documents\test.jpg"
} 

i open the Powershell console and run the script.
I change one File and save it -> i get 2 messages.
After this i Stop the script and change the same File again and no Picture or new entry in the Logfile.

You postet an NEW Message and THIS was the solution!!

I changed the Files with Notepad++ and press Ctrl-S or the Save Button -> i get 2 Messages.
When i use the Notepad.exe and after i change the file and i go to File Save -> i get only 1 Message!

Then just one more question.
Would it be possible to check several different paths

RE: check multiple files (Moved the Post from VBScriptto here)

Oh then it wasn't Powershell's fault but Notepad++'s ! smile

RE: check multiple files (Moved the Post from VBScriptto here)

Quote (sugram)


Would it be possible to check several different paths

Yes, it must be possible.

Maybe modify path and filter to be script command line arguments:

CODE

$filewatcher.Path = $args[0]
$filewatcher.Filter = $args[1] 
and then run the script more times:

CODE

.\monitoring_script.ps1 c:\tmp_01\ *.cfg
...
.\monitoring_script.ps1 c:\tmp_02\ *.txt
... 

Other possibility would be to use more instances of System.IO.FileSystemWatcher in one script:

CODE

$filewatcher_01 = New-Object System.IO.FileSystemWatcher
$filewatcher_01.Path = "c:\tmp_01\"
$filewatcher_01.Filter = "*.cfg"
...
$filewatcher_02 = New-Object System.IO.FileSystemWatcher
$filewatcher_02.Path = "c:\tmp_02\"
$filewatcher_02.Filter = "*.txt"
...
Register-ObjectEvent $filewatcher_01 "Created" -Action $writeaction
Register-ObjectEvent $filewatcher_01 "Changed" -Action $writeaction
Register-ObjectEvent $filewatcher_01 "Deleted" -Action $writeaction
Register-ObjectEvent $filewatcher_01 "Renamed" -Action $writeaction
...
Register-ObjectEvent $filewatcher_02 "Created" -Action $writeaction
Register-ObjectEvent $filewatcher_02 "Changed" -Action $writeaction
Register-ObjectEvent $filewatcher_02 "Deleted" -Action $writeaction
Register-ObjectEvent $filewatcher_02 "Renamed" -Action $writeaction
... 

RE: check multiple files (Moved the Post from VBScriptto here)

>you should get only one message for every change

Nope. Very much depends on how an application updates a file. The workaround is to simply ignore duplicate events

> fault ... Notepad+
Yep! See above ...

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)

Quote (mikrom)


Oh then it wasn't Powershell's fault but Notepad++'s !
you wrote that you changed it with the notepad, I tried it with this one and it works.
Normally I always use notepadd ++ here


Quote (mikrom)



Yes, it must be possible.

Many thanks for the Code!
I will test it.

RE: check multiple files (Moved the Post from VBScriptto here)

Ok, give it a try and then please let us know how you managed to check different file paths.

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
Good Morning.

I noticed a new "error" with the Script yesterday.
I copy the Test.cfg File in a different folder, change the file and copy back to the watched folder.
So i get 3 Messages?!?!

I found a better solution for me.
(Here the URL https://powershell.one/tricks/filesystem/filesyste...)
With this Script i get always 1 Message.

So i have changed the script and actually it work's.
I hope it was correct

CODE --> Powershell

# find the path to the desktop folder:
#$desktop = [Environment]::GetFolderPath('Desktop')

# 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 to monitor:
$AttributeFilter = [IO.NotifyFilters]::FileName, [IO.NotifyFilters]::LastWrite 

# specify the type of changes you want to monitor:
#$ChangeTypes = [System.IO.WatcherChangeTypes]::Created, [System.IO.WatcherChangeTypes]::Deleted , [System.IO.WatcherChangeTypes]::Changed
$ChangeTypes = [System.IO.WatcherChangeTypes]::Changed
# specify the maximum time (in milliseconds) you want to wait for changes:
$Timeout = 1000

# define a function that gets called for every change:
function Invoke-SomeAction
{
  param
  (
    [Parameter(Mandatory)]
    [System.IO.WaitForChangedResult]
    $ChangeInformation
  )
  
  Write-Warning 'Change detected:'
  $ChangeInformation | Out-String | Write-Host -ForegroundColor DarkYellow
  # send email
  Send-MailMessage –To "Email@domain.com" –Subject "CFG DATEI GEÄNDERT!" –Body "CFG Datei wurde geändert!" –SmtpServer "smtp.com" –From "noreplay@domain.com" -encoding ([System.Text.Encoding]::UTF8)
  Invoke-Item "C:\Users\username\Documents\test.jpg"


}

try
{
  Write-Warning "FileSystemWatcher is monitoring $Path"
    
  # create a filesystemwatcher object
  $watcher = New-Object -TypeName IO.FileSystemWatcher -ArgumentList $Path, $FileFilter -Property @{
    IncludeSubdirectories = $IncludeSubfolders
    NotifyFilter = $AttributeFilter
  }

  # start monitoring manually in a loop:
  do
  {
    # wait for changes for the specified timeout
    # IMPORTANT: while the watcher is active, PowerShell cannot be stopped
    # so it is recommended to use a timeout of 1000ms and repeat the
    # monitoring in a loop. This way, you have the chance to abort the
    # script every second.
    $result = $watcher.WaitForChanged($ChangeTypes, $Timeout)
    # if there was a timeout, continue monitoring:
    if ($result.TimedOut) { continue }
    
    Invoke-SomeAction -Change $result
    # the loop runs forever until you hit CTRL+C    
  } while ($true)
}
finally
{
  # release the watcher and free its memory:
  $watcher.Dispose()
  Write-Warning 'FileSystemWatcher removed.'
} 



currently I want to implement your solution

CODE --> Powershell

$path = $Event.SourceEventArgs.FullPath
  $changeType = $Event.SourceEventArgs.ChangeType
  $logline = "$(Get-Date), $changeType, $path"
  # write to logfile
  Add-content "C:\tmp\FileWatcher_log.log" -value $logline
  # write to console
  Write-Host $logline
  # send email
  #Send-MailMessage –To "Email@domain.com" `
  #                 –Subject "Event on file: $path" `
  #                 –Body $logline `
  #                 –SmtpServer "smtp.com" `
  #                 –From "noreplay@domain.com" `
  #                 -encoding ([System.Text.Encoding]::UTF8)
  Invoke-Item "C:\Users\username\Documents\test.jpg"
} 

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
hi again smile

I am currently failing to get the file name in my email notification just like in your script.
I hope you can help me smile

Many Thanks

RE: check multiple files (Moved the Post from VBScriptto here)

That new script you posted is more complicated for me than the previous.

I tried only to replace Ctrl+C handling in the old script with try-finally (as shown in the new script) - it works, but then notification has stopped working ...

RE: check multiple files (Moved the Post from VBScriptto here)

I adapted from https://powershell.one/tricks/filesystem/filesyste... the example called "Advanced Mode (asynchonous)", so that it writes output to console, to the logfile and it sends email. It's more similar to the older example I posted above and seems to work fine. It's advantage is that it handles Ctrl+C in the try-finally loop and so it does not have problems to run in PowerShell ISE.

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
Hello

I ask my question in the Forum and i get an answer.
With this script i get the Filename

CODE --> Powershell

Write-Warning 'Change detected:'
  $ChangeInformation | Out-String | Write-Host -ForegroundColor DarkYellow
  # send email
  Send-MailMessage –To "Email@domain.com" `
                   –Subject ("ACHTUNG CFG DATEI " + $ChangeInformation.Name ,"GEÄNDERT!")`
                   –Body ("CFG geändert " + $ChangeInformation.Name)`
                   –SmtpServer "smtp.com" `
                   –From "noreplay@domain.com" `
                   -encoding ([System.Text.Encoding]::UTF8) 

RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
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-...

CODE --> Powershell

$paths = Get-Content "D:\abc\Folder_monitored_paths.txt"; 

foreach ($path in $paths) 

is it possible to do that here as well.
My Powershell knowledge is absolutely insufficient for this

RE: check multiple files (Moved the Post from VBScriptto here)

Quote (sugram)


I have read here that the paths could also be read from a file
...
is it possible to do that here as well.

In the meantime I tried to build a loop directly into the script but it doesn't worked for me.
Then I got the idea to parametrize the example called "Advanced Mode (asynchonous)" from https://powershell.one/tricks/filesystem/filesyste... and to call it as background job.

So, first I parametrized the original script, changing in it these lines

CODE

...
...
# specify the path to the folder you want to monitor:
$Path = Split-Path -Path $args[0] -Parent

# specify which files you want to monitor
$FileFilter = Split-Path -Path $args[0] -Leaf
...
... 
and named the modified script monitor_file.ps1.

Then, I wrote second script monitor_all_files.ps1 which calls the first script. It reads from the configuration file monitor_files.cfg full paths of all files to be monitored and for every file it calls the first script monitor_file.ps1 as background job. All started background jobs are marked in an ArrayList.
The monitoring could be stopped by pressing Ctrl+C: After that, the program iterates over the list of started background jobs and stops and removes every job.
It seems to work as I expected.

Here is the second script:
monitor_all_files.ps1

CODE

# read all file paths from configuration file
$paths = Get-Content "c:\tmp2\monitor_files.cfg";

# create ArrayList for job names
$my_jobs=[System.Collections.ArrayList]::new()
$nr = 0
foreach ($path in $paths) {
  $my_job = Start-Job -FilePath .\monitor_file.ps1 -ArgumentList $path
  # append job name into array
  $nr = $my_jobs.Add($my_job.Name)
  Write-Host " .. starting job ""$($my_job.Name)"" for monitoring: ""$path"""
}

# Report all jobs
Write-Host
Write-Host "Now running these jobs:"
Get-Job
Write-Host

Write-Warning "Press Ctrl+C to end monitoring !"
Write-Host

try {
  while ($true) {
    Wait-Event -Timeout 1

    # write a dot to indicate we are still monitoring:
    Write-Host "." -NoNewline
  }
}
finally {
  Write-Host
  Write-Warning "Now, all monitoring jobs will be stopped and then removed:"
  foreach ($my_job in $my_jobs) {
    Write-Host " .. stopping and removing $my_job" -NoNewline
    Stop-Job -Name $my_job
    Remove-Job -Name $my_job
    Write-Host " .. Done."
  }
  Write-Host
  Write-Warning "Monitoring ends !"
} 


RE: check multiple files (Moved the Post from VBScriptto here)

(OP)
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 smile

RE: check multiple files (Moved the Post from VBScriptto here)

Quote (sugram)


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
smile
Don't worry, you are not the only one who had to experience such nasty problems with Powershell. I made a little mistake and it generated and sent me over 500 emails, which I then had to delete manually. And I also rebooted the PC several times in order to have to kill the processes repeatedly.
smile

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close