Use a script to filter files by name, then restore them into their original folders.
Use a script to filter files by name, then restore them into their original folders.
I have numerous files spread across multiple subfolders, and I need to relocate a specific set with the same filename at the end. Simply searching the root for the matching string would move everything into one place without preserving the original structure. You’d like to maintain the directory hierarchy while moving these files. Is there a method to achieve this? For instance, you could keep files like "C:\something\something\targetfolder\01\01\02\file.txt" in their current location but organize them under a new path such as "C:\something\something\otherfolder\01\01\02\file.txt".
You might want to explore the "Send To" option in File Manager. It involves right-clicking the folder you wish to transfer and selecting "Send To," which reveals various destinations for moving that file. If this doesn’t meet your needs, consider using the Windows command prompt (Win+R). This opens a terminal where you can run specific instructions. The command `cd` changes the directory, similar to navigating folders. You might need to change the drive letter by typing it followed by a colon—like D: for drive D. Be aware that filenames are truncated in this mode, limiting names to eight characters. This can cause confusion when handling multiple files. For instance, a folder named PHOTO622-018-222051.JPG would appear as PHOTO6~1.JPG. If you have several files with similar names, it becomes hard to distinguish them. Suppose your main folder is "Maui Trip Photos" on drive D. You could go to D: and then use commands like `cd Maui T~1` or `cd Island~1` to navigate. To copy all items from a specific folder, use commands such as `copy D:\Maui T~1\Island~1\Day 2\*.* C:\Users\Docum~`1\Pictu~1\*.*` or `xcopy D:\Maui T~1\Island~1\Day 2\*.* C:\Users\Docum~`1\Pictu~1\*.*`. If you only need certain files, replace the wildcard with a specific pattern. For example, copying only JPGs would change `*.*` to `*.jpg`. When dealing with many directories, there isn’t a single batch command unless all sources are in one place. If you’re unsure about chaining folders, you may need to move each one individually. If you’re not comfortable with this, a batch file could help, but it adds complexity and isn’t essential for a single operation.
I’m not sure if it works yet, but I’ve just started using this tool and it’s really helpful for moving or renaming photos. In the worst case, you’d have to set up folders manually first before shifting or changing names… (I think) https://www.faststone.org/FSResizerDetail.htm It might seem misleading, but it offers more flexibility than just resizing, even though that’s its main function.
I’m used to RUN and the Windows Commandline. I often rely on it. While I don’t know many advanced scripting or CLI tools like PowerShell or Robocopy, that’s not a big problem for me. The ~1 thing you mention seems to be just leftover from the 8.3 filename rule of DOS times. Still, in Windows 10 I can see full filenames correctly when using DIR. I recall having to handle this issue back in Windows95, but nowadays on modern systems it’s easier—especially since Windows 2000 or later lets you just type cmd without needing RUN. The real challenge is doing it manually for hundreds of folders: I’d have to run batch move commands one by one, and even then the move won’t work unless the destination exists first.
It's quick and easy to drag and drop files using this tool. I believe it will function even if I haven't tested it before.
Could this utility identify files by matching text in filenames and work through several subfolders? That’s the core problem you’re facing, and it seems there’s no built-in option without writing custom code. Robocopy can rebuild directories but doesn’t support text-based filtering across locations. Most searchable tools only allow searching within a single folder or limited to that scope. I also have concerns about potential file changes—any tool that does this might alter files or metadata, which isn’t acceptable for your needs.
I'm working on creating a batch file that tests every folder combination based on dates. It's challenging since I'm not very familiar with writing logic in batch scripts yet. I've been searching online for guidance on each step, and so far I haven't figured out how to list the folders properly or even if it will function as intended. It's still early in this process.