Computing.Net > Forums > Programming > how to lock certain folder and file

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

how to lock certain folder and file

Reply to Message Icon

Name: franco
Date: September 24, 2002 at 08:33:43 Pacific
OS: Win 98
CPU/Ram: Celeron 1.1 and 128mb Ram
Comment:

hi
can you help me how to lock certain folder or files that you cant delete, rename or edit? im using Visual basic and turbo c and Borland c++. is it posible on real time scanning and protecting folder and file just like other antivirus did? can you give me some site on how to make it? please help me.
thanx and God bless



Sponsored Link
Ads by Google

Response Number 1
Name: neil
Date: September 26, 2002 at 18:58:49 Pacific
Reply:

you cannot lock certain folder in windows, why not try dos? in the old days. try to rename the folder, its the very easiest to do. if you are using c++, try this.


#include
#include
#include

main()
{
char folder[30];
char newfolder[30];
strcpy(newfolder,"new_"); /*underscore*/
/* means alt 255*/
printf("what folder to be lock? ");
gets(folder);
if(rename(folder,newfolder)!= 0)
{
printf("locking file error");
}
getch() /*means pause*/
return 0;
}


you can try lock trough realtime scan but its very hard to use, maybe you can damage the registry. i advice you not to try it. you can try it if you are expert in using the registry.

you can visit my site or email me for more details.
franconeil.cjb.net


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: how to lock certain folder and file

how to creat a NEW .dat file in C? www.computing.net/answers/programming/how-to-creat-a-new-dat-file-in-c/4558.html

how to create a batch 837 file www.computing.net/answers/programming/how-to-create-a-batch-837-file/15547.html

How to return value from batch file www.computing.net/answers/programming/how-to-return-value-from-batch-file/17016.html