In general, there is some way.

I know some beginning of the way and end of the way, however, I don’t know what some folders will be called.

For example:

C: \ Folder1 \ Folder2 \ * \ * \ file.txt

As you can see, I know some initial path, I know a certain number of levels, but I don’t know how these folders will be called, I also know the final file name.

Is there any console utility in Windows that, using such a mask, would find and copy the file to me?

It seems that from the fact that I could find they copy only by the mask of the file itself.

Or maybe Total Commander has this functionality?

  • Of course have. FORFILES / S / P "C: \ Folder1 \ Folder2" / M file.txt / c "cmd / c copy @file c: \ ResultDir" Note: WinXP and W2K WKS do not contain this utility in the kit, for them you can take W2K3 Srv - Daemon-5
  • Discussion of the wealth of functional Total Commander will take more than one article. - Daemon-5

1 answer 1

It is possible through Total Commander. Go to the directory "C: \ Folder1 \ Folder2". Then click the button "Show all files without directories." Sort by name and copy the necessary files.

enter image description here

  • If there are a million files, then the total will die or will display them for a long time. - iluxa1810