powershell query maybe?

AshleyC

Suspended / Banned
Messages
2,956
Name
...
Edit My Images
No
Is there any way of making a text file loadable and viewable but not editable? If you set a files readonly flag you can still edit it but you have to save it out as a new name. I want to let people open a text (csv) file but not edit it at all. I'm not in a position to be able to convert it to a pdf or anything useful!
 
I would be intrigued if it is possible to make a plain text file "non-editable".

Having said that, I think I have in the past saved MS Word docs as pdf......but cannot recall if that also allows the properties to be made secure read only?
 
Excel will also save as pdf which may be more useful for a csv file.
I can't see any way of restricting the access to a file once it's left your PC. Your only real option is to convert it to a non-editable format like pdf. Of course, even that is editable if you have the full version of Acrobat but that is not exactly common.
 
Screenshot?
Puzzled why you can’t just use pdf.
 
Is there any way of making a text file loadable and viewable but not editable?
The only way to do that is to convert it to a format where the individual characters are not easily identifiable.

On Windows 10, you can simply print it to a PDF using the ordinary print dialogue and choosing Print to PDF.

Apple OS-X provides the same facility.

Linux will require a helper program such as enscript. This may not be installed on your system but can be added using the command: sudo apt-get install enscript You then run it with the command enscript my_text_file.txt -o - | ps2pdf - output.pdf replacing "my_text_file.txt" with the name of your original and "output.pdf" with the name you want to distribute.

An even more secure method is to print out the file then scan the paper version as a .jpg. It still won't stop a determined person from changing it but it'll take them a lot of effort to do so!
 
Perhaps you can associate the file format with an application that does not allow editing of files. But not sure if there are any such applications for .txt files. Perhaps a markdown viewer?
 
Is there any way of making a text file loadable and viewable but not editable? If you set a files readonly flag you can still edit it but you have to save it out as a new name. I want to let people open a text (csv) file but not edit it at all. I'm not in a position to be able to convert it to a pdf or anything useful!
You don’t specify what operating system or device you are using :(.
 
Not with a plain text file like CSV that you've given to someone else. You can lock (and password protect) a PDF or Excel spreadsheet, though. If you simply want to be able to prove later that a file is exactly as you distributed it, you can calculate a cryptographic hash with something like md5sum, then run it again on any supposedly unaltered file to make sure the hashes match. Or you can sign it in a verifiable way with something like GnuPG.
 
Perhaps you can associate the file format with an application that does not allow editing of files. But not sure if there are any such applications for .txt files. Perhaps a markdown viewer?
save your text files as .md files, then associate them with ‘Marked‘. This is a view only application so the user could not simply edit the file. Won’t stop them if they open via another application though.
Another option is to view them via a browser, create a link to the local or network location on a webpage and the user could only view not edit.
 
Back
Top