I’ll sometimes make use of this technique so that I can employ my favorite text editor’s search commands on the resulting list of files my text editor’s “search” functionality tends to be rather more robust, and to have more available options, than either a CMD prompt, or Windows itself, can provide. (And before anyone asks, yes, you CAN change the location and/or name of the destination file I only give “C:\List.TXT” here as an example.) There are two commands critical to using CMD effectively: change directory, and list directory. This will open an elevated Command Prompt window, allowing you to perform administrator actions using CMD. Right-click Command Prompt and select Run as administrator. Use the DIR command to list files and folders in the current directory, or DIR /S to list files and folders recursively, in subdirectories as well. Now all the results of your “dir” search command will be written to a file, “List.TXT”, in the root “C:\” directory. Click Start and type CMD into the search bar. If you don’t like the dreariness of paging through a list of files one screenful at a time for half an hour (or longer!), omit the “/p” switch and append the following to your “dir” command, after a space (without the quotes): “> C:\List.TXT”, so that the whole thing reads: The results, as they say, may surprise you. The result will be a list of all pdf documents on your C: drive.Ĭhange “*.pdf” to whatever you’re looking for. pdf” is what we’re searching for – in this case, any document that ends in “.pdf”, meaning all pdf documents. “/p” means paginate – stop after each screen of results, so you have a chance to read it. “/s” means list everything in the current directory and all sub-directories. Step 2: Now, it is time to select the destination where you want to create a new folder. DIR /s/p *.pdfĭIR is the “DIRectory” command, which lists the contents of that directory (aka folder). Step 1: Press the Windows key on your keyboard, type Command Prompt, and click open. This changes the current folder to the top of the C: drive, allowing us to search the entire thing. “CD” is the Change Directory command, and “\” indicates the top of the folder tree. In that Command Prompt, type the following (each followed by the Enter key): CD \īy default, the Command Prompt opens with C:\Windows\System32 as the “current” directory or folder. Replace Path 1 and Path2 with the path to the two. Copy the folder locations and paste it in the following command. Open both folders in File Explorer and click inside the location bar. Windows search function has improved dramatically, but in the long run, I still occasionally find using the Command Prompt as, if not more, effective.įire up a Command Prompt (you may want to “Run as administrator” to be able to search everywhere). In order to compare folder contents, you need the complete path to the two folders that you want to compare.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |