Search directory for a specific filename or a file type and copy files to new location using VBScript and batch file
First, You’ll start by editing the search-copy-files.vbs file.
- Open the vbs file using your favorite file editor.
- Change the image_base_path to your soure-path. Eg. Z:\Images\Newest Site Product Images\whitebackground\
- Change the image_target_new_location to your new-path. Eg. E:\whitebackground\
- Change keywords and file-type to your new-keyword and new-file-type.
- Save and close search-copy-files.vbs.
Secondly, edit the Run-Seach-Copy-Program.bat file.
- Open the BATCH file using your favorite file editor.
- Update the location of your vbs file.
- Save and close Run-Seach-Copy-Program.bat.
Lastly, Run the Program
- Double cLick Run-Seach-Copy-Program.bat to execute the vbs program.
- Wait for vbs to finish the task.
- Watch as windows copies your files to your new location.