How to set Search Depth in Windows File Explorer - windows

I want to find only folders which are named 'target' and are in a subfolder for example:
matches with:
c:\projects\test1\node_modules
c:\projects\test13\node_modules
matches I do NOT:
c:\projects\test1\node_modules\blabla\node_modules
c:\projects\test1\node_modules\blabla\node_modules\lalla\node_modules
Windows 10 Pro\21H2
even a that's currently not possible is a good answer ;)

Related

Find files of a certain format in Windows Explorer

Wish to load these files using windows explorer:
201809.xlsx
201701.xlsx
201812.xlsx
Exclude others not matching the above format, such as files like:
201809a.xlsx
201809b.xlsx
201812.csv
Basically, recognize anything that's six numbers in a row without any additional characters and ending in .xlsx
The following works in this case
20????.xlsx

How can I find duplicately named files in Windows?

I am organizing a large Windows folder with many subfolders (with sub folders, etc...), in which files have been saved multiple times in different locations. Can anyone figure out how to identify all files with duplicate names across multiple directories? Some ways I am thinking about include:
A command or series of that could be run in the command line (cmd). Perhaps DIR could be a start...
Possibly a tool that comes with Windows
Possibly a way to specify in search to find duplicate filenames
NOT a separate downloadable tool (those could carry unwanted security risks).
I would like to be able to know the directory paths and filename to the duplicate file(s).
Not yet a full solution, but I think I am on the right track, further comments would be appreciated:
From CMD (start, type cmd):
DIR "C:\mypath" /S > filemap.txt
This should generate a recursive list of files within the directories.
TODO: Find a way to have filenames on the left side of the list
From outside cmd:
Open filemap.txt
Copy and paste the results into Excel
From Excel:
Sort the data
Add in the next column logic to compare to see if the current text = previous text (for filename)
Filter on that row to identify all duplicates
To see where the duplicates are located:
Search filemap.txt for the duplicate filenames identified above and note their directory location.
Note: I plan to update this as I get further along, or if a better solution is found.

Script to remove parts of a filename

I am looking for a way to remove parts of my file names (big folder). I don't want to rename them all but I merely want to have an output of the edited file names in a text document or clipboard.
They all follow the similar pattern. The initial part of my file names are randomized by the system. I am not sure how to proceed in terms of what to use to complete the first part. Here is an example filename:
1231230#p9999_w_e_aa.jpg
I want to extract 9999 part (the part between the #p and the first underscore).
The machine I'm currently working from is running Windows 7.

Windows 7 - Search pattern inside office files in specified directory or below

I want to search for numbers in the form
??????-???? 0r ??????????
inside files
I tried a lot of search programs that wont work. I think I need a kind of"Grep" - but for Windows.
And then output file/directory to a log file when found.
If it's not absolutely 100 % to find mathes I also need the found number in the log, to check without having to open the file(s) to check.
Any solutions? (I cannot program myselv - would think it's relatively simle)
regards

Command Prompt: Move a file to an Unknownly named folder

So, is there a possible way to move Test.txt to C:\ProgramData\CsD2\Tools\("Unknown Folder Name")\data\per Using command prompt?
using foxidrives solution for your previous question for detecting the correct directory, then just
move test.txt "%folder%\"
Short answer: yes. Not quite sure what the situation is that has left only the middle part of your path unknown, and the need to use the comnand line, but I have encountered similar cases on Linux and expect the algoirthm can be adapted to Windows commands. It's possible to do this by hand rather than writing a shell script, but it's up to you and your skills.
Permissions matter. Make sure you elevate yours enough to read and write in Tools before continuing.
First, change directory to C:\ProgramData\CsD2\Tools\
Presumably there are many items here. Some may be "hidden," so list the contents of this directory and be sure to include an option to show hidden files and folders. If you can, restrict the search to directories only.
It's tempting to display contents recursively in the above step. It's up to you, but I find it makes the output cluttered without a script to do the rest of the work.
Now it's time to search for the subfolder set that theoretically only exists in your target folder. Suppose Tools contains the directories fldr1, fldr2, and fldr3. Use your command to list a directory's contents with the path "fldr1\data\per", then use "fldr2\data\per", and so on until it doesn't return an error. Per may be empty, but that should look different from the path not found error.
Now you've found the name of your mystery folder. Write it down for future reference.
At thus point, you know the path to Test.txt, and the full path to the destination directory. Do a move command to relocate Test.txt, and you're done. I like to relist the contents of the target directory after to be comfortable that it arrived.

Resources