Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Author
Message
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 7th Apr 2003 20:43
hi,

Another question, is there such a command to hide a file?

Like, Hide a bitmap file so no-one can edit it.

thanx.
Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 7th Apr 2003 23:12
No, there is no native command to do that.

Also, hiding files won't stop people editing it, just use File Options to make Hidden files visible.

You can rename them with special extensions which make the file nigh-on impossible to open (eg: turn the file into a folder).

Current Project: Retro Compo. Entry.
Shady Simpson
23
Years of Service
User Offline
Joined: 15th Mar 2003
Location: United Kingdom
Posted: 8th Apr 2003 18:43
thanx rob,

but how would I change a file to a folder and could DBPro still load it as a bitmap if it was a folder?

Rob K
Retired Moderator
23
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 8th Apr 2003 19:53
DBPro would be confused as well probably I am afraid.

Current Project: Retro Compo. Entry.
DangYankee
23
Years of Service
User Offline
Joined: 19th Feb 2003
Location: United States
Posted: 8th Apr 2003 20:49 Edited at: 8th Apr 2003 20:55
Quote: "Like, Hide a bitmap file so no-one can edit it."

Well yes if you use the zip extensions and password protect the zip file, there is a good example of it in the demos where it reads in the texture from a password protected file on the fly.
Hope that helps.. my extentions came on the DBP disk but they sould be around here or on the RGT site.

It's not the size of your code but how efficiently you use it!
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 9th Apr 2003 02:55
The direct answer to your question is to make an exec call to the command line program 'Attrib'

To hide a file from the system, "Attrib +h <filename>" and to unhide "Attrib -h <filename>".

This process is about as secure as a loonatic deprived of medication.


Using the include media option is enough to thwart most people, but those in the know can go strait past that. Also it bloats your file size. I would love to have more media inclusion options in DBPro.

The best method is to write your own file format, easier would be to scramble a few (or many) bytes of existing files and unscramble them to a temp folder to read them and immediately delete them after reading.

Possibly a better method would be to load media data to a memblock. This in itself might actually be enough to thwart many people if the filenames are suiteably obscure, at least it would thwart non-DB users. You would gain extra security of the files my moving some of the bytes about as that would make it very difficult for even DB users to get at the data.

Note that .bmp, .txt, and .wav are uncompressed formats therefor are extremely easy to crack from a few byte swaps - these files should be more intensely scrambled if you really wish to protect them.

Pneumatic Dryll, Outrageous epic cleric of EQ/Xev
God made the world in 7 days, but we're still waiting for the patch.

Login to post a reply

Server time is: 2026-07-10 23:13:32
Your offset time is: 2026-07-10 23:13:32