


::> uncomment next line to get verification message ::> if all files and filesizes match in %vidpath% and %servpath% then it deletes the originals from %vidpath% then removes temp folder ::> then if file lists and sizes dont match it goes down to :files_differ and deletes temp folder and files from %vidpath%įc /b %cd%temp\servercp.txt %cd%temp\DirContents.txt > nul ::> comparing file contents of both directories to make sure they mattch before wiping the card

::>writing a text file containing all the file contents from vidpath and servpathĭir "%vidpath%" /-p /a-d /o:gn | FIND "/" > %cd%temp\DirContents.txtĭir "%servpath%" /-p /a-d /o:gn | FIND "/" > %cd%temp\servercp.txt ::> creates temp directory for text comparison files if it doesnt exist ::> copies files from %vidpath% to %servpath% If not exist "%servpath%" mkdir "%servpath%" ::> creates new directory in the offload folder with the date and camera subfolder ::>source location of video files %cd% automatically uses your sd cards drive letter including first slash E.G. Set servpath=\\server\pictures\%stamp%\%camname%\ ::>destination location of your video files \cameraname\ should be uniquie per camera name so files are organized by camera ::>creates subfolder under date for camera, leave blank if you want all pictures in one directory ::uncomment next 2 lines to preview the date stamp ::>time and date stamp YYYYMMDD, HHMMSS and YYYY-MM-DD_HH-MM-SSįor /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set dt=%%a One downside with this method is you have to use a USB card reader, and you have to plug the card reader in, to the usb port, not just plug the sd card into the reader, so keep that in mind.īelow is the code in its entirety what you want to do is make both files in the base directory of your SD card one named “filecopy.bat” and “autorun.inf” an easy way to do this is to right click in the directory and go to New>Text Document and replace the NewTextDocument.txt with the required file names.Īfter you have the files created open autorun.inf with notepad or notepad++ and paste this into off I decided to play around with this new software a bit and though to myself if each device just had a script on it that moved all the files over with an autorun function boom I could just pop the cards in and let it do its thing automatically! After come googling I came across a software that brings autorun back to windows, called “APO USB Autorun”.

So I decided to look into how to automate it all, first thing that came to mind was autorun but apparently it has been removed from usb devices in newer versions of windows. When I would come home from hunting and it came time to offload all the video and from my cameras I’d have to sit there and manually copy the files over and wait, then swap cards, manually copy and wait, I generally have 4 cards to offload upto 100GB of data at a time.
