Welcome to Tesla Motors Club
Discuss Tesla's Model S, Model 3, Model X, Model Y, Cybertruck, Roadster and More.
Register

Wrote script for USB copy / delete.

This site may earn commission on affiliate links.

SabrToothSqrl

Active Member
Dec 5, 2014
4,579
4,154
PA
Got bored. Automated this. It's not refined, with variables at the top and what not, but do with it what u want.

drop it into notepad save as USB backup.bat and run it after you modify it to suit your needs.

Note, the path: "N:\Media\Temp\TeslaCam\SabrToothSqrl" has to exist before you run this. (or make your own path/ base folder name)


"E" is the drive letter of my USB stick.




echo off
cls

Echo Copy Tesla Dash Cam local, then clear USB.
Echo DO NOT RUN TWICE without renaming destination copy.


Pause

REM Make new folder
N:
cd "N:\Media\Temp\TeslaCam\SabrToothSqrl"
mkdir %date:~-4,4%-%date:~-10,2%-%date:~-7,2%

REM Copy Files

robocopy "E:\" "N:\Media\Temp\TeslaCam\SabrToothSqrl\%date:~-4,4%-%date:~-10,2%-%date:~-7,2%" /MIR /W:1 /R:1

E:

RMDIR "TeslaCam" /S /Q

mkdir "TeslaCam"

Pause