Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

Resolved Question

creating file than can be only opened once

Oct 14, 2012 8:47AM PDT

I need to create a password protected (text?) file than can be opened only once. It can be in any software or even disposable flash drive. Any ideas how to do that, or what to use?

Thanks, ka1950

Discussion is locked

ka1950 has chosen the best answer to their question. View answer

Best Answer

- Collapse -
Since deleted files ...
Oct 16, 2012 6:14AM PDT

can be undeleted and screenshots can be made it would be difficult if the person receiving the file has even a little computer literacy.

It can be done with a batch file and to see for yourself follow the following steps.

1. Create a directory (folder) c:\test
2. Within that folder create a text file or copy in any file you desire - for this example use newtext.txt
3. Now use the file's properties to make newtext.txt hidden and read only
4. Now that the test file is present create a simple batch file called newtext.bat
5. newtext.bat only needs to contain these lines
notepad newtext.txt
attrib -h -r newtext.txt
del newtext.txt


6. Tell the recipient to double click the newtext.bat file and to close the text file after reading it. The batch file will first open the file (if it is not a text file use an appropriate program) to allow it to be read then upon closing the application it removes the hidden and read only attributes and deletes the file. Since it is deleted by command it will not go to the recycle bin.

- Collapse -
Answer
Have you seen this done?
Oct 14, 2012 9:00AM PDT

For now it would be something that would require an internet connection. That way the key or maybe the contents can be only available for the one show. But what if I recorded it with a camera?

It appears that this is too easy to defeat.

Bob