sir i want to lock with password protection to my '.c' files.how i can do that.
please suggest sir.
thanks

Probably the simplest and most secure is to keep all your source code on a removable media.

AFAIK it is not possible to password protect files on either MS-Windows or *nix. So the best solution is gerard's suggestion. Copy the files onto an external drive and delete the originals.

commented: incorrect. there are several ways. whether it's "worth it" is another question, but one can do it. -1

Protect from who?

If you edit the files, you may end up with a copy in the swap file.

If you delete the file, the data will remain on disk until the space is re-used by the file system.

If you compile the file, then the pre-processor expanded copy of the source might be in the temp directory. Even if it's deleted, problem 2) remains.

Protect from who?

If you edit the files, you may end up with a copy in the swap file.

If you delete the file, the data will remain on disk until the space is re-used by the file system.

If you compile the file, then the pre-processor expanded copy of the source might be in the temp directory. Even if it's deleted, problem 2) remains.

This is a very good point or points. Maintaining a data free environment is expensive in time and procedures.

you can certainly password-protect files -- and even entire directories.... the easiest way is called "setting permissions" on *nix and windows has an equivalent, and the password protection is your account login. of course if you share an account the issue is moot. you also have no protection against the superuser or root (windows admin).

a more thorough but expensive solution (in time and money) is to get 3rd party encryption software to password-protect entire files and directories. This will stop everyone, up to and including industrial or government forensics agencies if you really want to pay for it.

but here's another, far more likely, possibility: nobody gives a flip about your C-programming homework. so forget about it.


.

By password protect I was assuming he meant that when you click on a file a window would popup and ask for a password, something similar to password-protected zip files. So that you could have different passwords for different files.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.