Blade Runner
07-05-2002, 03:53 PM
Do you want them to quit seeing what you have got on your pc? Are you in fear of them finding you pr0n, hacking stuff, internet sex chats you saved for a lonely night (lol, none of this applies to me, i'm being overdramatic!)? Anyways.......if you do or think you might know, pay attention. I was learning about batch files and stumbled on this. It logs the name of the file opened and can make it not run all together. OK, enough of my rambling. Here is how to log and stop someone from seeing text files....
open notepad
paste the lines not in parentheses into it but still read the parentheses!
echo %1 >> log.txt
(log.txt is the log of the things opened and time opened)
notepad %1
(this part is optional, it depends if you want the nosy person still seeing what they clicked; if you don't, then don't put this part in here)
IF "%1" == "notepad.txt" ECHO Error
(if you put the optional line in there, than don't put this! notepad.txt stands for the file you don't want them to see; if the name of the text file is bondssexchats.txt (:p), then it would be "bondssexchats.txt", not "notepad.txt")
Now save this file and at the end of the name type .bat .
Right click the text file you don't want them reading and click open with and click choose program. On the program list click browse and choose the name of the batch file you just created. Be sure to mark it as always open it with this program.
Now when someone clicks the text file to open it, it logs it and doesn't come up if you chose to take that one part out of the batch file.
Its easier than it sounds. Try it with other files too, like images or something.
If just thought I'd share this. If you have trouble post it.
open notepad
paste the lines not in parentheses into it but still read the parentheses!
echo %1 >> log.txt
(log.txt is the log of the things opened and time opened)
notepad %1
(this part is optional, it depends if you want the nosy person still seeing what they clicked; if you don't, then don't put this part in here)
IF "%1" == "notepad.txt" ECHO Error
(if you put the optional line in there, than don't put this! notepad.txt stands for the file you don't want them to see; if the name of the text file is bondssexchats.txt (:p), then it would be "bondssexchats.txt", not "notepad.txt")
Now save this file and at the end of the name type .bat .
Right click the text file you don't want them reading and click open with and click choose program. On the program list click browse and choose the name of the batch file you just created. Be sure to mark it as always open it with this program.
Now when someone clicks the text file to open it, it logs it and doesn't come up if you chose to take that one part out of the batch file.
Its easier than it sounds. Try it with other files too, like images or something.
If just thought I'd share this. If you have trouble post it.