Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use batch processing to search a specified file and copy it to a specified location

Shulou Source: shulou.com Published: 2022-06-03 05:36:50 10月04日 Update

Editor to share with you how to use batch processing to achieve a comprehensive search of specified files and copy to the specified location, I hope you will gain something after reading this article, let's discuss it together!

The code is as follows:

@ echo off&setlocal enabledelayedexpansion set num=0 set / p filename= Please enter the file name to find [include file extension]: set / p newpath= please enter the specified directory to copy to: if not exist! newpath! Md! newpath! 1 > nul 2 > nul set! If! zh! NEQ "\" set newpathways created newpath!\ for% an in (cd e f g h i j k l) do (cd / d% a:\ for / r. % I in (* .exe) do (if "% ~ ni%%~xi" = "! filename!" Set / a numb set 1 & & copy "% I"! newpathies%% numb files%% nul% Xi 1 > nul 2 > nul & & echo% I%% ~ nil numb% numb, start! newpathways filecopy.txt) after reading this article, I believe you have some understanding of "how to use batch processing to search a specified file and copy it to a specified location". If you want to know more about it. Welcome to follow the industry information channel, thank you for reading!

Tags: File copy location search article input code done extension file name more directory knowledge industry information information channel channel Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Docker NVidia Shulou Tech Info Shulou Technology Xiaomi