1,241 questions
0
votes
5
answers
112
views
How to pause method execution until at least N seconds have passed since the last change to a directory?
I have a process that needs to intermittently move some files from one directory to another. Before I move the files, I need to ensure that a user isn't currently adding files to the directory - if ...
1
vote
1
answer
71
views
Identify changes to FS (file) every second forcing file created program flushing the write buffers
I need application to identify changes to the file system, particularly to identify file creation and updates. The text files are being created by another application, and are not closed until that ...
0
votes
0
answers
65
views
Chokidar not giving proper events in network shared path
Chokidar is not giving proper events when multiple users are watching same network shared path.
For example :- Shared Net Patrh is = \nas\TempShare\Test
Now multiiple users from their individual ...
1
vote
0
answers
159
views
How to Watch changes in folders in KUBERNETES / go lang
In the Kubernetes environment, we are using configmap as a mount to a specific folder.
The configmap is often modified and updated to kubectl application -f [configmap-name]
I want to use fsnotify to ...
0
votes
1
answer
66
views
windows service app with FileSystemWatcher starts and then stops
I have a filesystemwatcher watching a folder where cameras save the files. It's supposed to add the name/date to a database so they can be deleted at a later date.
watcher = New System.IO....
1
vote
1
answer
658
views
FileSystemWatcher on Windows Service .NET 8 [IHostedService]
Im trying to create a windows service application with .NET 8 using as a Hosted Service, the idea of my app is Watch for a list of folders. The problem is that I'm losing the event Created fired by ...
1
vote
0
answers
88
views
C# filesystemwatcher not triggering for all files in watch folder
I am using C# filesystemwatcher to monitor a folder for new files that are generated from two web sites running on the same machine. Sometimes new files trigger my event handler and sometimes they do ...
2
votes
0
answers
60
views
FileSytemWatcher error event to Observable
The "Creating Observable Sequences" section of the e-book INTRODUCTION TO RX.NET (by Ian Griffiths and Lee Campbell) describes how to transform file system events generated by ...
2
votes
1
answer
252
views
FileSystemWatcher not working when running as a Windows service in .NET 8
I have an app that works well as a cmd line app, but when running as a service, the FileSystemWatcher stops working.
I have validated that the service has access to the files as it's using the same ...
0
votes
0
answers
36
views
Powershell error when using FileSystemWatcher
I wrote code with the WPF window to synchronize files between two folders. After clicking the Run button, the code will run and monitor changes in folder f1. If a change is detected, it will execute ...
0
votes
0
answers
63
views
How to incorporate file renaming with FileSystemWatcher?
I have a FileSystemWatcher script that monitors the XML-TO-TRANSFORM folder for XML and audio files. When a new file is created in that folder, the FileSystemWatcher detects it, grabs the XML, applies ...
-1
votes
2
answers
82
views
How can FileSystemWatcher detect deletions from multiple volumes?
I wrote a program which can open or empty the recycle bin and lives in the tray. I am using SHEmptyRecycleBin to perform cleaning and FileSystemWatcher to detect changes in the recycle bin folder. The ...
0
votes
0
answers
34
views
Dynamic Log level by monitoring configuration file with filesystem watcher is resulting in system.IO exception
I want to reload my log level by changing configuration file without application restart. I added filesystem watcher to monitor changes in config
static void OnConfigFileChanged()
{
...
1
vote
0
answers
118
views
IOptionMonitoring<>.OnChange not triggered on some K8s Pods
I am using .net6.0 And I want to monitor some changes from the configuration files and react to the changes.
I have the following code to register the config file:
{
...
new ConfigurationBuilder()
...
2
votes
0
answers
64
views
FileSystemWatcher works reliably, unless I write to a log file
I am using a fileSystemWatcher to watch for a xlsx to be saved. This is registered as a renamed event, on which I want to execute a python script. I then want to save this action to a log file created ...
1
vote
1
answer
49
views
Powershell - Nested loops seeming to ignore if statement
I have a feeling this may be a fairly simple one. Basically, I have an application that, during runtime execution, generates temporary xml files. These can be useful for troubleshooting purposes. ...
-2
votes
3
answers
455
views
How to properly handle a list of IDisposable items in my Dispose()?
I have a class like this:
public class MyFolderRefresher {
public async Task OnRename(RenamedEventArgs e) {
// do something
}
}
public class MyDisposableListOfFileSystemWatchers : ...
2
votes
0
answers
83
views
How to offload SQL code to another task / thread - FileSystemWatcher
I've been hacking at this problem since 2 months ago! Im tired, confused, burnt out and disillusioned !
I want the code below to read a file when its dropped into a folder. Sometimes 2 or three files ...
0
votes
0
answers
71
views
Comparing 2 text files while actively looking for changes
I need my program to compare a main file with a reference file which is just a copy of the original one. The program actively looks for changes to the main file by comparing it to the comparison file ...
1
vote
3
answers
234
views
How to make FileSystemWatcher events run in an STA Thread in a console application?
I'm writing a console application that scans a directory for files and uploads the data in them to a database. The files are a proprietary type that require a specific library that requires the ...
0
votes
1
answer
143
views
Stream file, file in use, FileSystemWatcher and question about threads
I've been trying to create a script which takes the content of a text file which may look like this (1 line text in a .txt. file):
SomeData SomeData SomeData
and these files are dropped ...
-1
votes
1
answer
276
views
High cpu usage Windows forms
Relatively new to c#. I made a windows form that monitors for changes to a change in a file. The program takes up 30% of my CPU and I would like to make it run a little lighter. After running the ...
0
votes
1
answer
90
views
FileSystemWatcher/File.ReadAllLines causing IO Exception: Could not access file because it is being used by another process
I'm developing Windows Service that is using FileSystemWatcher to trigger on creation of a new folder. OnCreated it reads a file insp_board.txt that is located in that new folder, logs data into log....
0
votes
0
answers
49
views
FileSystemWatcher doesn't work on FTP file drop
I have a service that monitors a directory using FileSystemWatcher. That portion is relatively simple:
Protected Overrides Sub OnStart(ByVal args() As String)
WriteToLog("ZMES SAP Importer - ...
0
votes
0
answers
81
views
FileWatcher Get UserName that dropped a file
I realize that I may have to use Auditing to get the answer here but short of that I was wondering if anyone knew of a way to get the name of the User that dropped the file into the watched folder.
...
0
votes
2
answers
418
views
Textbox value not updating in asp.net
I have a FileSystemWatcher which monitors a directory for text files and when found it shows part of text in the textbox. I tried adding a breakpoint and saw that the .Text property have the desired ...
1
vote
3
answers
328
views
Is there a "folder fingerprint" to detect if a folder's contents have changed between two points in time? I cannot use FileSystemWatcher
I am looking for the fastest way (in C#/ASP.NET) to detect if anything inside a folder has changed between two points in time. I don't need to know the files, total size, or anything else about the ...
2
votes
0
answers
71
views
FileSystemWatcher stops raising events after some time [duplicate]
I am using FileSystemWatcher to monitor newly added files in several folders. FileSystemWatcher is created for N number of folders/directories to watch separately. It works fine at the start but after ...
1
vote
1
answer
65
views
Unable to find events being raised when log file changed
Im trying to use FileSystemWatcher to watch a file and check for changes, when a change occurs it should run aa command, this works when im saving the file in notepad, however not from the actual ...
0
votes
0
answers
99
views
FileSystemWatcher.Changed event gets triggered when shared excel file is closed
I'm using the FileSystemWatcher.Changed event in my VB.NET application to track changes in files, mainly Excel files. I have used NotifyFilters.LastWrite Or NotifyFilters.Attributes.
I have observed ...
2
votes
1
answer
893
views
How can I pass variables into a Powershell ObjectEvent action
I'm writing a tool which will take an action whenever a new file is written into a folder on a windows server. I'm using the following
$action = {
write-host "action fired"
Process-file $...
0
votes
0
answers
104
views
How to use FileSystemWatcher with FIFO processing in C#
How to use the FileSystemWatcher with FIFO processing? The FileSystemWatcher trigger event whenever the files are pasted in the directory, so I want to perform one file at a time as first in first out ...
1
vote
0
answers
44
views
In powershell, how do I process only a single event after a file modification?
Right now, I am attempting to manage boolean flags via a global hashtable:
# Context: System.IO.FileSystemWatcher
# File Event: 'Changed'
$global:sourceId2Flag = @{}
...
$objectEventArgs = @{
...
...
2
votes
0
answers
135
views
When use fanotify, files from deleted directory have incorrect path
When I use fanotify for listening to file changes, when I delete a folder in the root directory, the files under this folder appear with (deleted) characters, for example:
/data/service/el2/100/hmdfs/...
0
votes
0
answers
152
views
How to notify the FileSystemWatcher that file copy either from same machine or another machine completes and start processing
I have below program where StartFileWatcher looking into a folder (C:\TEMP) (including subdirectories) and copying all the files info to the C# channel based of file LastWriteTimeUtc and having some ...
0
votes
0
answers
49
views
System Argument Error from direct file location and TextBox1
I am creating a project which will convert xls to xlsx, doc to docx and ppt to pptx using Spire libraries.
I am browsing files and then saving the files complete location to TextBox1.text.
I get the ...
0
votes
0
answers
123
views
I'm writing a code for fanotify to listen a filesystem
I'm writing a code for fanotify to listen a filesystem, but I'm having trouble writing a file move-in and move-out event, and I'd like to ask if a file is moved in a file system that's being listened ...
0
votes
1
answer
34
views
How to get more information about FileSystemWatcher events?
The code from https://learn.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=net-7.0 reports about ten events per new file, something like "Created, Deleted, Created, Changed, ...
0
votes
1
answer
202
views
FileSystemWatcher InternalBufferSize limit is getting exceeded
We are receiving files in FileSystemWatcher folder very frequently because of that InternalBufferSize limit is getting exceeded and files are being missed.
I am using the max limit 65536 allowed for ...
0
votes
1
answer
114
views
Check if file is changed by an external application
I'm creating a kind of file-editor in WPF, what is the best practice to check if a file has been changed outside of my own WPF application? I know I can track files with the System.IO....
0
votes
2
answers
1k
views
Spring Boot application with File Change Listener cannot initiate repository service
Introduction
In my spring boot application, I need a feature to read files from a monitored directory with a listener on it, then parse/upload into postgresql database once it finds a file.
Client ...
-1
votes
1
answer
70
views
File not found even though it is there. .doc and .txt work but .jpg and .png don't
I have this code:
public void OnCreated(object sender, FileSystemEventArgs file)
{
Console.WriteLine("created called");
string[] files = Directory.GetFiles($"{textBox2.Text}&...
2
votes
2
answers
81
views
Can't use watcher.Filters.Add() function in .sln project
I am creating a project and I am using FileSystemWatcher, however I need to add multiple filters and watcher.Filters.Add() doesn't work. I am using .NET Framework ver. 4.8 and have .NET core 7.0.203 ...
0
votes
2
answers
1k
views
Watching a folder for New Files and determine when file copy is finished
I am using fileSystemWatcher in C# winforms to monitor new files and folders created in the c:\Backup Folder, my clients transfer files to this folder and my application is supposed to zip newly ...
0
votes
1
answer
54
views
Register-ObjectEvent ghost instance running
I am using New-Object System.IO.FileSystemWatcher / Register-ObjectEvent (Powershell) to monitor a folder for new files and perform action. It is being run as a scheduled task under a service user ...
0
votes
1
answer
94
views
VB.NET Updating UI and controls in real time
I am trying to make a CheckedListBox_Notifications that shows items listing the changes happening in a specific directory. Upon the load of the form I have the code:
Public Watcher_ActiveProjects ...
-1
votes
1
answer
138
views
Folder monitoring - Deleting files after process has completed
I am running a FileWatcher in a folder that is looking for a files with extension .stl and .txt
watcher.Filter = "*.stl";
watcher.Filter = "*.txt";
These files are added to the ...
1
vote
1
answer
640
views
FileSystemWatcher throws System.IO.InternalBufferOverflowException in C# Windows Form [closed]
I created an application in C# that continuously listens to a folder for new file additions, once a new file is added, it picks up that file and uploads it to an S3 bucket. I tested the application ...
1
vote
2
answers
767
views
How to create a queue to store incoming files added to a folder, when more than one file is dropped in at a time?
I made a service which monitors a folder to see when a new file is added. When a new file is added, the file is broken down by line (each line is stored in a list), and the data stored in each line is ...
0
votes
0
answers
43
views
Do Loop handling Queue Events displaying multiple host output from one event powershell
I have a script that monitors a directory for csv file changes and displays the results on the screen as an output. But when a single file has changed i.e. one event multiple lines appear in the ...