Skip to content

herbiezimmerman/Powershell-FileMonitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Powershell-FileMonitor

This is my attempt at building a PoSH script that will monitor a file location and copy any newly created or newly updated files to a destination folder. The goal is to get the script to be able to read multiple source folders as arguments and copy everything over while also keeping the folder structure.

Usage

Seems to only work via a cmd window that has been elevated. Type the following in the cmd window: Set-ExecutionPolicy RemoteSigned and hit enter. Type the following in the cmd window: powershell -noexit -file filecopy.ps1 -srcfolder -dstfolder and hit enter.

#Known issues

  • It will monitor ONLY one source folder currently. The work around is to run multiple instances of the script pointing to the different folders you want monitored (ie: C:\Users%usernamee%\AppData\Roaming and C:\Users%usernamee%\AppData\Local\Temp).

  • Source and destination folders need to be created first or the script will fail.

Resources used

Fixed

2017-07-06: Script now copies ALL of the source folder to the destination folder and updates accordingly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published