Can I trigger a scheduled task when the contents of a folder change?

nzdreamer55

New member
Member
Local time
7:39 AM
Messages
51
Hello everyone,

I want to use the windows task scheduler to run a task when something is copied to a folder on my server. When this happens several programs run and extract files, rename them and move them automatically.

Right now I have the window task scheduler running a task every 5 minutes on this folder so when something get's copied into it the files will be processed, however this is a really bad way of doing this. I saw under the task scheduler trigger I could begin the task on an event and that I could create a filter based on something.

The problem is I don't know if there is anything that can be used when a folder changes. I have attached a picture showing the trigger and filter screen so you can see what I am talking about. Is there something on the right (encircled with red) that I could use?

I know that there are a lot of ways of doing this (monitoring a folder) and a lot of other programs that will "just do it for you", but I would like to come up with a solution using windows task scheduler if possible.

Thank you in advance for your help.
-S
 

Attachments

  • Task Scheduler.JPG
    Task Scheduler.JPG
    91.3 KB · Views: 43

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitAMD Athlon II X4 640 Propus 3.0GHz Socket AM3...G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM D...On board graphics-HDMI output
Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
Well I guess this must not be done very often as still no replies. If a mod thinks this should be in a different forum could you let me know? If someone knows of a forum that would be better I would love to hear about it.

Thanks again for any help you can provide.

-S
 

My Computer My Computer

At a glance

Windows 7 Home Premium 64bitAMD Athlon II X4 640 Propus 3.0GHz Socket AM3...G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM D...On board graphics-HDMI output
Computer Manufacturer/Model Number
Home built
OS
Windows 7 Home Premium 64bit
CPU
AMD Athlon II X4 640 Propus 3.0GHz Socket AM3 95W Quad-Core
Motherboard
ASUS M4A88TD-M/USB3 AM3 AMD 880G SATA 6Gb/s USB 3.0 HDMI Mic
Memory
G.SKILL NS 4GB (2 x 2GB) 240-Pin DDR3 SDRAM DDR3 1333 (PC3 1
Graphics Card(s)
On board graphics-HDMI output
Sound Card
On board output over HDMI output
Monitor(s) Displays
Vizio 42" TV M420NV
Screen Resolution
1080p
Hard Drives
OS:Western Digital SiliconEdge Blue SSC-D0064SC-2100 2.5" 64GB SATA II MLC Internal Solid State Drive (SSD) - OEM
3X:Western Digital Caviar Green WD20EARS 2TB SATA 3.0Gb/s 3.5"
1X:500mg seagate drive (not sure model)
PSU
Antec BP550 Plus 550W Continuous Power ATX12V V2.2 80 PLUS C
Case
COOLER MASTER HAF 912 RC-912-KKN1 Black SECC/ ABS Plastic AT
Cooling
3 fans 1x 200mm, 1x120mm LED Cas
Keyboard
IOGear Multimedia Keyboard with Laser Trackball wireless
Mouse
see keyboard
Internet Speed
16M/s Cable Provider Charter
Other Info
Microsoft Windows 7 Home Premium 64-bit 1-Pack for System Builders - OEM
ASUS 24X DVD Burner Black SATA Model DRW-24B3LT LightScribe Support - OEM
Gigibit Router
Same problem but...

Hi nzdreamer55,

I am a software engineer. I was looking for an easy solution to do exactly what you want, but it looks like very few people need this. So I am going to work on it tonight. I will let you know what I find out.

Serge
 

My Computer My Computer

At a glance

windows 7 Enterprise
OS
windows 7 Enterprise
Dude, did you manage to get the correct answer from anybody? I need exactly the same thing. Thanks
 

My Computer My Computer

At a glance

Windows 8.1 64
Computer type
Laptop
OS
Windows 8.1 64
I hope the server is mostly idle. Any time I tried anything that automatically detected folder changes it bogged the entire system by hogging the HD. It relentlessly checks every file in the folder tree to see if the modification,access times etc.. are the same as last time. If you have thousands of files in that folder tree you can see why the system would bog.

For this type of stuff to work smoothly I suspect the file system needs to be implemented as a true relational database. Then changes are logged as they happen. No big performance hit.

I don't know any Windows file system that fits that description though. :)

Edit: Long story short, you are probably better off polling every so many minutes.
 

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.

My Computer My Computer

At a glance

Windows 7 Pro 32Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz4,00 GB (Usable 2,98)NVIDIA NVS 5100M
Computer type
Laptop
Computer Manufacturer/Model Number
HP Elitebook 8540p
OS
Windows 7 Pro 32
CPU
Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz
Motherboard
Hewlett-Packard 1521
Memory
4,00 GB (Usable 2,98)
Graphics Card(s)
NVIDIA NVS 5100M
Sound Card
NVIDIA High Definition Audio
Screen Resolution
1600x900
Hard Drives
INTEL SSDSA2CW120G3
Antivirus
F-Secure Internet Security
Browser
IE, Firefox, Opera
Other Info
Sandboxie,
SRP (Software Restriction Policy),
EMET (Enhanced Mitigation Experience Toolkit),
WFC (Windows Firewall Control by BiniSoft),
Malwarebytes Premium

My Computer My Computer

At a glance

Windows 7 Pro 32Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz4,00 GB (Usable 2,98)NVIDIA NVS 5100M
Computer type
Laptop
Computer Manufacturer/Model Number
HP Elitebook 8540p
OS
Windows 7 Pro 32
CPU
Intel(R) Core(TM) i5 CPU M 540 @ 2.53GHz
Motherboard
Hewlett-Packard 1521
Memory
4,00 GB (Usable 2,98)
Graphics Card(s)
NVIDIA NVS 5100M
Sound Card
NVIDIA High Definition Audio
Screen Resolution
1600x900
Hard Drives
INTEL SSDSA2CW120G3
Antivirus
F-Secure Internet Security
Browser
IE, Firefox, Opera
Other Info
Sandboxie,
SRP (Software Restriction Policy),
EMET (Enhanced Mitigation Experience Toolkit),
WFC (Windows Firewall Control by BiniSoft),
Malwarebytes Premium
WMI may work a bit better. But I know for a fact the WinAPI for file change notification is a dog. :) You have more leeway with a server to be sure. Running the WinAPI call on the workstation is a disaster.
 

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
Back
Top