r/Batch•
Bobcat47

Task Scheduler Script Triggered by Event

Trying to make it so that a GoPro's files (.jpg, .mp4) are automatically moved off of the device when plugged in.

I am having trouble because of the way the GoPro connects to Windows as an MTP device. When I plug it in just as the SD card it's easy. The Task Scheduler/Event Viewer part works well.

I found and modified (new to batch so relied heavily on internet): FOR /R "D:\DCIM" %%i IN (.jpg,.mp4,.thm,.lrv) DO MOVE "%%i" "A:\GoPro_Files"

^ This works great with it plugged in as an SD card

This is what I tried when plugged into USB: FOR /R "HERO7 BLACK\GoPro MTP Client Disk Volume\DCIM" %%i IN (.jpg,.mp4,.thm,.lrv) DO MOVE "%%i" "A:\GoPro_Files"

^ This doesn't execute. There is no Drive letter for the GoPro when plugged in USB so maybe my syntax is way off.

Any suggestions would be appreciated.

Additional request would be guidance on prompts during the batch that would ask about about location of destination (could be done by just having 3 destinations as separate lines and replying N to each until correct one is displayed

Posted Sep 13, 2019, 2:37 PM UTC · edited

23
Loading comments…