79824105

Date: 2025-11-19 06:04:10
Score: 0.5
Natty:
Report link

I Have Built The Same Idea ,
Watch A Folder -> If Any File Is Added To Folder -> Rename It With Unique Name To Avoid Conflict
(Use GUID) ->Then Move It To Another Folder Based On File Extension ;

And I Can Clearly Say Windows Service Is The Best Practice In This Situation , I Don't Exactly Know Why You Don't Want To Use It , But If You Want An Application That Run In Background To Do Specific Task , You Are Asking For A Windows Service .

tip : If You Are Going To Use FileSystemWatcher , Be Careful If A Big Number Of Files Is Add At The Same Time (15<)
It May Not Do Them All , So Make A Thread (In The Service) That Check Every 3 sec If There Any File Left In The Folder
And Don't Do The Mistake Of Trying Of Processing Them All Because You May Have 1000 Files Left
Take Them 30 By 30 .
I Know You Said The Frequency Of Files Won't Be A lot , But You Have To Be Safe

tip1 : If You Are Going To Make It As A Windows Service You Have To Know That FileSystemWatcher Is Not A Service But It Depends On Some Services , Like {RpcSs . EventLog , LanmanWorkstation}
So When You Create A Service You Have To Add Those Into Your Service Dependencies , So The Computer Lunch Them Before Your Service , So You Don't Have Exceptions And Errors

Reasons:
  • Long answer (-1):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Eyad Dawood