DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Batch file to auto download drone files

SabrToothSqrl

Well-Known Member
Joined
Mar 16, 2021
Messages
81
Reactions
41
Age
44
Location
PA
Got tired manually moving files to my computer. Wrote this. feel free to use/modify as you wish. copy it to notepad, save as "other" and file name "drone unload.bat"

In this case, Z is the drive I want to save the files do, which already has a folder "Drone".
and D: is my drone memory card.







REM Move drone videos to folder under drone with today's date


REM Browse to Drone folder & Make new folder YYYY-MM-DD

z:
cd Drone
md "%date:~-4,4%-%date:~-10,2%-%date:~-7,2%"
cd "%date:~-4,4%-%date:~-10,2%-%date:~-7,2%"
md "Images"
md "Videos"




REM Move files from drone

d:
cd DCIM
cd 100MEDIA


move *.jpg z:\Drone\"%date:~-4,4%-%date:~-10,2%-%date:~-7,2%\Images"
move *.mp4 z:\Drone\"%date:~-4,4%-%date:~-10,2%-%date:~-7,2%\Videos"


REM Hold here when done
REM Any key to continue
PAUSE
 
thanks. it's not too fancy, but gets the job done. I think I'll add a line that opens explorer to the new folder at the end. I move the photos first, so you have something to look at while it's running. It also only accounts for 1 download per day and doesn't check for existing folders. so errors could occur if you try to run it more than once. I should write it in powerShell, but that feels like overkill. maybe it could do more error checking then with friendlier prompts. Maybe powershell can get the file count and size so I can add a progress bar. I wish you could wirelessly download the files from the drone. Just power it on, connects to my home wifi and downloads... I'll squeeze it in between learning Swift, work, and other hobbies lol.
 
  • Like
Reactions: Jubjub Bird
"it's not too fancy, but gets the job done."

Agreed, SabrToothSqrl. Your code is not fancy, as you say--reading it reminded me of good old DOS. But "fancy" is not necessarily a virtue; your code is simple but solid. And because the code you posted is simple, lots of forum members could, with a little effort, modify it for their specific needs. Yay.

And for we weird people old enough to have basic knowledge of DOS batch programming, every line of your batch code was DOS-like, simple and human readable. (To those who currently lack DOS knowledge, it is not hard to find and learn, but at present, learning Microsoft Powershell is likely more urgent and useful. And to those of use who do have DOS memory, what a nice trip down memory lane, and reminder that our old batch knowledge still has value!)

Cheers,

--Jub
 
  • Like
Reactions: rxlawdude
And for we weird people old enough to have basic knowledge of DOS batch programming, every line of your batch code was DOS-like, simple and human readable. (To those who currently lack DOS knowledge, it is not hard to find and learn, but at present, learning Microsoft Powershell is likely more urgent and useful. And to those of use who do have DOS memory, what a nice trip down memory lane, and reminder that our old batch knowledge still has value!)
/Yoda Voice ON
Evil, Powershell is. Mmm. Powerful, yes, but in this power great evil also lurks. Insidious, like the dark side of the force. In DOS, only light and simplicity will you find.
/Yoda Voice OFF
 
  • Haha
Reactions: rxlawdude
Remove the last line (PAUSE)

and put in

start z:\Drone\"%date:~-4,4%-%date:~-10,2%-%date:~-7,2%\"

or whatever your drive letter is (replacing Z).

that will launch explorer in the path of the new folder/files when it's done automatically now.
 
  • Like
Reactions: eipbroc
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
130,593
Messages
1,554,190
Members
159,598
Latest member
fast54