r/ScriptSwap • u/marthelous • Nov 15 '18
Script to ping USB on window desktop when a user plugs it in.
Hi, I'm looking for a script to ping USB flash drive to the Desktop when a user plugs their USB drive to a port. Please let me know if there is such.
1
u/hngovr Nov 16 '18
open cmd, type ping USB>%USERNAME%Desktop
1
u/marthelous Nov 16 '18
Are you sure this will work for all usb that plug in to the computer.
1
u/hngovr Nov 16 '18 edited Nov 16 '18
maybe replace USB with (drive letter):, so
ping F:\>%USERNAME%\Desktop\USB.txtmaybe save it as .bat
1
0
Nov 15 '18
[deleted]
4
u/zimmertr Nov 16 '18
Get a mac
Seriously? That's just unhelpful and not needed at all.
OP, a quick Google search brought me here: http://www.tweaknow.com/DriveShortcut.php
1
u/marthelous Nov 16 '18
Not usb device right. Ok boss.