this one doesn't even show anything
Your post is more then unclear.
What do you expect, you pass just a file name to the function FINDSTR, but no search pattern or any other parameter; of course you get an empty result.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
findstr [/b] [/e] [/l | /r] [/s] [/i] [/x] [/v] [/n] [/m] [/o] [/p] [/f:flag.txt] [/c:<string>] [/g:flag.txt] [/d:<dirlist>] [/a:<colorattribute>] [/off[line]] <strings> [C:][Users\user4\Documents]flag.txt[ ...]
The system cannot find the file specified.
can you check what's wrong with this commands?
findstr C:\Users\user4\Documents\flag.txt (this one doesn't even show anything)
this one doesn't even show anything
Your post is more then unclear.
What do you expect, you pass just a file name to the function FINDSTR, but no search pattern or any other parameter; of course you get an empty result.
Hi,
I'd be happy to help you out with your question. Sorry for the inconvenience caused.
The first command is incorrect because it is missing the /c
switch. The /c
switch is used to specify the string that you want to find. In this case, you want to find the string flag.txt
. So, the correct command would be:
findstr /c:flag.txt C:\Users\user4\Documents
The second command is incorrect because it is not specifying a string to find. The findstr
command will only print the lines in a file that contain the specified string. So, if you don't specify a string, it will print nothing.
To fix this, you can add the /c
switch and specify the string that you want to find. For example, to find the string flag.txt
in the file C:\Users\user4\Documents\flag.txt
, you would use the following command:
findstr /c:flag.txt C:\Users\user4\Documents\flag.txt
Windows 10 Security is a built-in security app that comes with Windows 10. It provides real-time protection against viruses, malware, and other security threats. You can use Windows 10 Security to scan your computer for threats, manage your security settings, and get help with security problems.
To open Windows 10 Security, go to Start > Settings > Update & Security > Windows Security.
You can also open Windows 10 Security by pressing the Windows key + S and searching for "Windows Security."
Windows 10 Security has a number of features that can help you keep your computer safe. These features include:
If you are concerned about the security of your computer, you should use Windows 10 Security to help protect it. Windows 10 Security is a powerful tool that can help you keep your computer safe from a variety of threats.
For more Information, please refer to following resource :-
findstr | Microsoft Learn - https://learn.microsoft.com/windows-server/administration/windows-commands/findstr
If you have any other questions or need assistance with anything, please don't hesitate to let me know. I'm here to help.
If the reply was helpful, please don’t forget to upvote or accept as answer, thank you.