Moving Folders With FSRM

Nick 1 Reputation point
2020-08-26T14:10:38.583+00:00

My team has been asked to set up an automated system to "archive" project directories on our Server 2019 share. In reality they want certain directories to be moved to another location automatically based on a flag file saved within the directory that needs to be move, this flag file would be something like flag.abcd. I know FSRM can screen for file extension, I'm able to see the events created when saving a file like this to the share, but I can't seem to find a way to have FSRM do something with that directory. Is there an automated way to have FSRM do something with the directory it sees a file in that gets hit by the file extension screen? I figure there may be some way to run a script for every file found but I don't know if FSRM would pass that file path off to the script step, if that makes any sense.

Windows Server 2019
Windows Server 2019
A Microsoft server operating system that supports enterprise-level management updated to data storage.
3,737 questions
Windows Server Storage
Windows Server Storage
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.Storage: The hardware and software system used to retain data for subsequent retrieval.
650 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,518 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Ian Xue 36,661 Reputation points Microsoft Vendor
    2020-08-27T06:51:35.753+00:00

    Hi,
    I don't suppose FSRM is the best way to monitor file creation. The System.IO.FileSystemWatcher class could be helpful.
    https://learn.microsoft.com/en-us/dotnet/api/system.io.filesystemwatcher?view=netcore-3.1

    Best Regards,
    Ian

    ----------

    Please remember to "Accept Answer" and upvote if the reply is helpful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.