How to search a file in your PC by using CMD, notepad
Hello friends, Here I'm with a new trick How to show your desired-named file in your PC by your CMD. by using notepad. The file you search will be resulted with in 10 seconds.
Just copy and paste the following code in notepad and save it as anything.bat. Remember, save the file with extension ".bat". Or just download the file from here.
set shell = CreateObject("WScript.Shell") fileNam=Inputbox("Enter part of the file name you want to search","File Name") If(fileNam <> "") then dirName=Inputbox("In which drive you want to search ?"+vbcrlf+"Example: If you want to search in D drive then enter only D","Drive name") msgbox "Searching the entire drive may take some seconds. Press OK continue.",,"Message" Shell.run "Cmd.exe" WScript.Sleep 3000 Shell.sendkeys "dir "+dirName+":\ /s /b | find "+Chr(34) + fileNam + Chr(34)+"{ENTER}" End If
Now just open the file. It will promt you to enter the drive letter where you want to search.
Now enter the drive letter and the string you want to search named with.
Now the files along with the path will be displayed in your command promt with in 10 seconds.
0 comments:
Post a Comment