-4

Batch script which would notify concurrently if any file or folder is created/ copied in a certain file location.

The batch file will simulate a listener. When a new file/folder is copied/created in a valid file path it would trigger an action.

  • You need to show us what _you_ have tried on your own! SO is not a free code writing service... – aschipfl Dec 24 '15 at 12:28
  • 1
    Don't use a batch file (command processor) to observe a directory (tree) on modifications. Batch file processing is by design not event triggered. See for example [Execute batch file when a new file is added to a folder](http://stackoverflow.com/questions/5923802/) for a PowerShell solution. – Mofi Dec 24 '15 at 13:00

1 Answers1

1

The idea that I have is that every file/folder that is on there automatically moves to another folder, so each time there is a new "thing" on the original folder an action will be done;

@echo off
:LOOP
cls
dir /b /a "ORIGINALFOLDER\*" | >nul findstr "^" && (move>nul ORIGINALFOLDER\* FOLDER2 & goto ACTION)
goto LOOP

:ACTION
*do something*
*pause/timeout/...*
goto LOOP

I hope this helps...

Renk Software
  • 144
  • 2
  • 10