Search found 5 matches

by sam201
15 Nov 2019 15:43
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file please help
Replies: 8
Views: 765

Re: batch file to search and copy particular file please help

You're not asking for help, you're asking for someone who writes the code for you. Actually not the purpose of a support forum. @echo off &setlocal set "target=C:\Folderusb" if not exist "%target%\" md "%target%" for /f tokens^=2^ delims^=^" %%i in ( 'WMIC Path Win32_DiskDrive Where "InterfaceType=...
by sam201
15 Nov 2019 14:47
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file please help
Replies: 8
Views: 765

Re: batch file to search and copy particular file please help

Problem i think is here do i need this part or no (( It's your code. You should know it better than me. I'd incorporate my loop instead and use variable %%j in the rest of this code snippet instead of %%a. Can you help m with search & copy command to take file from usb to my hdd for example in c:/F...
by sam201
15 Nov 2019 13:56
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file please help
Replies: 8
Views: 765

Re: batch file to search and copy particular file please help

What did you try? And what particular problems are you facing? I understand that code @echo off &setlocal for /f tokens^=2^ delims^=^" %%i in ( 'WMIC Path Win32_DiskDrive Where "InterfaceType='USB'" Assoc /assocclass:Win32_DiskDriveToDiskPartition 2^>nul ^|findstr /c:"Disk #"' ) do for /f tokens^=4...
by sam201
15 Nov 2019 13:30
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file please help
Replies: 8
Views: 765

Re: batch file to search and copy particular file please help

So, my understanding is that you already have the code to copy the files you're looking for. The missing thing is how to find the USB drives. Give this a go: @echo off &setlocal for /f tokens^=2^ delims^=^" %%i in ( 'WMIC Path Win32_DiskDrive Where "InterfaceType='USB'" Assoc /assocclass:Win32_Disk...
by sam201
15 Nov 2019 12:28
Forum: DOS Batch Forum
Topic: batch file to search and copy particular file please help
Replies: 8
Views: 765

batch file to search and copy particular file please help

hi, i have been trying to make a batch file which does the following: 1. search all usb drives for *.jpg,ppt,pptx, pdf and doc and docx files. 2. it should detect the usb drive and copy the files in hard disk in a folder and hide it. i would appreciate if anyone can share the batch file or the code ...