Search found 6 matches

by Kamrul08
07 Jun 2016 01:54
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 12142

Re: How to be sure selected drive is removable or not?

Just awesome. Thanks a lot. No way for all version of windows? To be honest, I couldn't care less about creating solutions for 9 year plus old operating systems. In this case you'd need to replace the use of choice for XP and Vista. I also believe that some versions of 2000 had an error which allow...
by Kamrul08
05 Jun 2016 10:14
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 12142

Re: How to be sure selected drive is removable or not?

@echo off setlocal enableExtensions disableDelayedExpansion set source="%userprofile%\Downloads" set /p Letter= Enter your USB Drive Letter here: :: parse the list, setting found to 1 if your drive is removable set "found=" for /F %%a in ('WMIC LOGICALDISK Where "DriveType=...
by Kamrul08
05 Jun 2016 10:09
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 12142

Re: How to be sure selected drive is removable or not?

If you're on Windows 7 or newer, just use this script instead! @Echo Off SetLocal EnableExtensions EnableDelayedExpansion Set "Source=%UserProfile%\Downloads" For /F "Skip=2 Tokens=*" %%A In ('WMIc DiskDrive Where InterfaceType^="USB"^ Assoc /AssocClass:Win32_DiskDrive...
by Kamrul08
04 Jun 2016 00:10
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 12142

Re: How to be sure selected drive is removable or not?

What is stopping you from parsing that list to see if your selected drive letter is in that list? I do this copy job regularly. Although I know the USB drive Letter but sometimes I accidentally press the wrong drive letter. It copies the files to my local drive instead of USB storage and it makes p...
by Kamrul08
03 Jun 2016 09:57
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 12142

Re: How to be sure selected drive is removable or not?

Look at this thread. http://www.dostips.com/forum/viewtopic.php?t=3455 Thanks for reply. But this topics doesn't match my requirement. I can find out removable drive. But I want to know weather my selected drive is removable or not. The command bellow works fine to shows removable drive. wmic logic...
by Kamrul08
03 Jun 2016 08:18
Forum: DOS Batch Forum
Topic: How to be sure selected drive is removable or not?
Replies: 15
Views: 12142

How to be sure selected drive is removable or not?

I want to copy some files to my USB Drive. For this I made the script bellow. It’s working fine. @echo off echo. echo. set source="%userprofile%\Downloads" set /p Letter= Enter your USB Drive Letter here: rem echo n| copy /-y %source%\*.pdf %Letter%:\ echo n | copy /-y %source%\*.pdf %Lett...