delete specific files on a usb key even when the drive letter changes

hey guys new here, i wanted to pick your brains as im struggling to find an answer to what im looking for!

basically ive got some software that my dad had wrote by a programmer it ships with hardware he sells, (vehicle diagnostics etc) im editting his installer that runs from a usb key which also acts as a security dongle so it has to be by dongle and i cant switch to CD or DVD , it uses a batch file which i will eventually convert into a .exe as long as the code all works

the batch file works great, it all installs fine and goes thru spot on and everything is fine, the only thing i cant get to grips with is i would like to delete some driver files from the usb once it has installed once this is so people who try to steal the software once its been installed once will be missing crucial drivers(long story but go with me on this one for now!) my problem is when you put in a usb key, its normally a different drive letter everytime, so i cant link to a static drive letter to delete from ie; C:/ D:/ etc etc, ive tried using CD (to go to top directory) and then DEL for delete but i cant seem to get it to work, im not overly experienced with ms dos, but ive coded in other languages so i understand the fundamentals just not the syntax,

heres what i have:

del folder/file1.dll
del folder/file2.dll
del folder/file3.dll
del folder/file4.dll

i know its probably rubbish but hey ive tried for days on this before asking for help! thanks

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!