how to set file attributes for read only purpose

  • Thread starter Thread starter sunilpgt
  • Start date Start date
S

sunilpgt

hi,
i am confused to write a code for setting some file attributes.in
such a way that if we disable copy&paste option for a text file it
shouldn't be copied? At that instant there should come a message box
showing that permission is denied.how is it possible?would you help me?
 
i am confused to write a code for setting some file attributes.in
such a way that if we disable copy&paste option for a text file it
shouldn't be copied? At that instant there should come a message box
showing that permission is denied.how is it possible?would you help me?

I don't think that this is possible. If a file can be read, then it can
be copied. Even if you somehow found a way to disable copy operations, you
could, for instance, open the text file with Notepad, and then select "Save
as..." to write a copy. Or you could open a command prompt and execute "TYPE
file.txt >thecopy.txt".
 
Alberto Poblacion said:
I don't think that this is possible. If a file can be read, then it can
be copied. Even if you somehow found a way to disable copy operations, you
could, for instance, open the text file with Notepad, and then select
"Save as..." to write a copy. Or you could open a command prompt and
execute "TYPE file.txt >thecopy.txt".
Or, you simply write a program, that reads the file and writes the content
into a new file ;-) That will also work for binary files and even, if
somehow type or copy is disabled for this file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top