0

I have a .CMD/.BAT file which task is to move files with a specific extension from my downloads folder to another folder. Fairly easy and it works.

What I'm looking for is a way of telling either Windows or Google Chrome to start this CMD/BAT file whenever the specific filetype is downloaded (or found in the downloads folder).

Is there a way?

Adriano Repetti
  • 65,416
  • 20
  • 137
  • 208
Denniz
  • 175
  • 1
  • 15
  • possible duplicate of [batch file to monitor additions to download folder](http://stackoverflow.com/questions/4230976/batch-file-to-monitor-additions-to-download-folder) – Adriano Repetti Jul 22 '14 at 12:26

2 Answers2

0

You could try this, it will moniter the Downloads folder for changes and move files when they are created although you will have a Comand prompt screen open. These are used to make it Silent (sort of)/np /nfl /njh /njs /ndl /nc /ns /MON:N this is to check when N number of changes are made to the folder /MOV is move instead of copy

robocopy /np /nfl /njh /njs /ndl /nc /ns /MOV /MON:1 c:\users\%username%\Downloads C:\NewDIR *.txt

To run the .bat file with out a console window you can call the .bat with a VBS

Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("BatchFile.bat"), 0, True
Badradish
  • 196
  • 1
  • 13
0

I've changed the BAT file to loop through a 'check and copy' procedure every 10 seconds. Once run it checks if the required files are present in my downloads folder and then moves those files to the other folder. I have to start and stop it manually, but if necessary I could automate that with a scheduled task.

Denniz
  • 175
  • 1
  • 15