I'm running Windows and I have a massive group of .pdf files (several thousand) all stored in one large directory, and then all variously organized into a variety of subdirectories within that main directory.
e.g.:
K:\OriginalDirectory [main directory]
K:\OriginalDirectory\2010 [subdirectory 1]
K:\OriginalDirectory\2011 [subdirectory 2]
K:\OriginalDirectory\2013 [subdirectory 3]
My problem: I need to copy-and-paste about 1900 of these files into a new directory. The Windows "find" function won't let me do this, as trying to use the "or" operator to combine 1900 unique file names exceeds the 255 character limit for "find."
So I tried the following (based on another StackOverflow answer), using the command line:
C:\OriginalDirectory>for %I in (doc1.pdf doc2.pdf doc3.pdf) do copy %I C:\SomeOtherDirectory
This works, but doesn't search the subdirectories. Also, it requires me to type out all 1900 file names, which isn't ideal.
Is there a way for me to complete this task using just the command line that searches all subdirectories within my main directory AND doesn't require me to type out 1900 file names?