select/search multiple files, copy and paste to a new folder

vika

New member
Local time
10:52 AM
Messages
1
I have a list of 1000 files names. Need to find them in one folder which has 5000+ files in it. Any possible way to highlight those files from my list so I can copy paste to a new folder?
 

My Computer My Computer

OS
window 7 professional
That is an easy task for a batch file, if your list of 1000 files names can be saved in a txt file with every file name on separate line. Something like this:
Code:
Report_23.docx
Presentation45.ppt
Diagram_67.xls
Then save this list to txt file; rename it to list.txt and put in your folder of 5000 files.

Download and extract a script in attachment. Start that script "ZZZZ_script.bat" AS ADMINISTRATOR , in the same folder of 5000 files. It will open your list.txt file(which should be there already) and will start searching for files and making copies to C:\your_files folder, which is predefined in that script.
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
Other Info
"The scale icon at the top right of a post or tutorial is how you can give rep to the member."
Subdirectories

This is so awesome, thank you. Any way, however, to edit the script to search within the sub-directories in that folder for the contents in the list.txt?
 

My Computer My Computer

OS
Windows 7 Home Premium 64bit
This is so awesome, thank you. Any way, however, to edit the script to search within the sub-directories in that folder for the contents in the list.txt?
A little bit late for reply, but here you are.
Version with the search in subfolders.
 

Attachments

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
Other Info
"The scale icon at the top right of a post or tutorial is how you can give rep to the member."
I have a similar task, I need to create batch that will look in a folder that contains a 1000+ files and need it to highlight or do something so i can be able to distgunish which key words from the file actually exist in the folder, the files that exist are based on key words "the key words are numbers", each file in the folder contains these keywords and on each file name the key words are indexed at 0-3 from left to right, so its the first four characters. and i have them saved in a txt one per line
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Dell
OS
64bit
CPU
Quad I7
Thank you for such as awesome script
Neutron16. Would it be possible to please explain how would I make this script save the images which are missing in a txt.

Any help is greatly appreciated

Thanks
 

My Computer My Computer

Computer type
PC/Desktop
OS
Victoria
That is an easy task for a batch file, if your list of 1000 files names can be saved in a txt file with every file name on separate line. Something like this:
Code:
Report_23.docx
Presentation45.ppt
Diagram_67.xls
Then save this list to txt file; rename it to list.txt and put in your folder of 5000 files.

Download and extract a script in attachment. Start that script "ZZZZ_script.bat" AS ADMINISTRATOR , in the same folder of 5000 files. It will open your list.txt file(which should be there already) and will start searching for files and making copies to C:\your_files folder, which is predefined in that script.

How do I fnd the original ZZZZ_script.bat I only see version 2 with sub directories?? Please and thank you.
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 Ultimate x64
rottengman, I would rather look for existing software that can do that.

simpledude, sorry, I didn't get your question. If your file is not in the "list.txt", script won't copy it to the folder.

tipsykid68, please see attachment
 

Attachments

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 8.1 ; Windows 7 x86 (Dec2008-Jan2013)
Other Info
"The scale icon at the top right of a post or tutorial is how you can give rep to the member."
If I want to change destination folder from C:\ to D:\ or another ... How should I do?


Please Please :D
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows XP
Thanks a lot this is what i was looking for and its working
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 Home
Thanks for the script! Can you adjust it so, it will only search for 2 file extensions: .sldprt and .slddrw

I have a folder with 30000 drawings named (examples):
123.sldprt
123.slddrw
1234.sldprt
1234.slddrw

so it would help if i only put this in the text file:
123
1234

(I know this is an old post)
 

My Computer My Computer

Computer type
PC/Desktop
OS
64
is there any way to run this without administrator?
 

My Computer My Computer

Computer type
PC/Desktop
OS
windows 7 64
Error with file doesn't exist

That is an easy task for a batch file, if your list of 1000 files names can be saved in a txt file with every file name on separate line. Something like this:
Code:
Report_23.docx
Presentation45.ppt
Diagram_67.xls
Then save this list to txt file; rename it to list.txt and put in your folder of 5000 files.

Download and extract a script in attachment. Start that script "ZZZZ_script.bat" AS ADMINISTRATOR , in the same folder of 5000 files. It will open your list.txt file(which should be there already) and will start searching for files and making copies to C:\your_files folder, which is predefined in that script.


Hi, When I try this it is being executed successfully but it says file not found. I'm trying to search few PDF files from a folder which has around 200K PDFs.
The error message is: "The process tried to write to a nonexistent pipe"
Please help!

Thanks!
 
Last edited:

My Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
HP
OS
Windows 7 Enterprise x64
Is there any other way to do it? i mean with out running any codes?
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
hp
OS
64
CPU
hjgh
Motherboard
hjg
Memory
ghjgh
Graphics Card(s)
jghjgh
Hard Drives
jhj
Antivirus
jghg
Browser
hkghkgh
This isn't working for me. I followed all the instructions but I probably missed something. I right click and run as admin right?
 

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 64 bit Ultimate
Can i use this for copying jpg files.... tried a lot but was not worki

Can i use this for copying jpg files.... tried a lot, but was not working


That is an easy task for a batch file, if your list of 1000 files names can be saved in a txt file with every file name on separate line. Something like this:
Code:
Report_23.docx
Presentation45.ppt
Diagram_67.xls
Then save this list to txt file; rename it to list.txt and put in your folder of 5000 files.

Download and extract a script in attachment. Start that script "ZZZZ_script.bat" AS ADMINISTRATOR , in the same folder of 5000 files. It will open your list.txt file(which should be there already) and will start searching for files and making copies to C:\your_files folder, which is predefined in that script.
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
hp
OS
64
That is an easy task for a batch file, if your list of 1000 files names can be saved in a txt file with every file name on separate line. Something like this:
Code:
Report_23.docx
Presentation45.ppt
Diagram_67.xls
Then save this list to txt file; rename it to list.txt and put in your folder of 5000 files.

Download and extract a script in attachment. Start that script "ZZZZ_script.bat" AS ADMINISTRATOR , in the same folder of 5000 files. It will open your list.txt file(which should be there already) and will start searching for files and making copies to C:\your_files folder, which is predefined in that script.


This is a wonderful piece of aytomation, I need with a small modification , can you please help
I need to search a word alone in the file and need to match and copy
Eg :
File name:

AR_father_5433.xls
AR_mother_7746.xls
AR_sister_76475.xls

My list will contail like:

father
mother
sister



can you please modify the batch for me pleaseeeeeeeeeeeeeeeeee :confused:
 

My Computer My Computer

Computer type
Laptop
OS
Windows 7 Ultimate x64
Hi Alex,

Is this batch file (attached) what you were after?

Define your list inside the batch file rather than having a separate .txt file hold your list of words.
 

Attachments

My Computer My Computer

Computer type
PC/Desktop
OS
Windows 10, Windows 8.1 Pro, Windows 7 Professional, OS X El Capitan
Brilliant , thanks Neutron16. I started with a list of 350 .MOV files that I needed to retrieve from amongst ~10000 video and image files spread over hundreds of sub-directories. The script took almost an hour to finish but it worked perfectly.
It has inspired me to put some time into learning some of these command line super powers.
 

My Computer My Computer

OS
windows 7
Awesome and ive tried to modified the destination and excellent
 

My Computer My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Acer
OS
Windows 7 ultimate x64
CPU
Amd a6
Motherboard
Ecs a55
Memory
4gb
Graphics Card(s)
R7
Hard Drives
Seagate
Back
Top