I'm thinking about working with a batch file.
I would like to find the files in the file name test and copy only the files to the target directory (dest), although the subdirectories have different hierarchies from the current directory (target).
I would like to use robocopy to copy files because I want to skip errors and leave logs.
Thank you for your cooperation.
It's not a very neat method, but how about the following command?
Copy the subdirectory and then copy the current.
cd [FromDir]
for /d %i in (*) docopy %i [ToDir] *test*
robocopy [FromDir] [ToDir] *test*
If you use for
in the application of the following article, you will be able to do so.
I want to extract all files in the "Designated Directory Name" in "Any Hierarchy" in "Designated Directory"
Is it like this?
for /r TargetDir%I in (*test*.*) drobocopy% to pI DestDir% to nxI
If necessary, add detailed options such as file selection and log output to the end of the robocopy command specification.
However, if the folder name or file name contains spaces, something strange may happen, so be careful or think about it.
614 PHP ssh2_scp_send fails to send files as intended
690 Error in x, y, and format string must not be None
1133 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
773 Uncaught (inpromise) Error on Electron: An object could not be cloned
717 GDB gets version error when attempting to debug with the Presense SDK (IDE)
© 2025 OneMinuteCode. All rights reserved.