Creating an uncopyable file

"uncopyable" - I just made that word up, feel free to use it whenever you want.

Under DOS you could create a file with a space in it and it could then not be copied (using DOS copy or diskcopy commands). But under Windows this don't work since you can have spaces in a file name, so is there a way to do something similar under Windows?
LVL 2
paulburnsAsked:
Who is Participating?
 
stevenlewisCommented:
YOu can try this
in dos name the file
any(alt + 255)file.ext
this will make the file unopenable in windows, and you will have to know the full name in dos
it will give you the message path not found in windows
0
 
nietodCommented:
this isn't a C++ question.  its a windows question.  you might do better asking it in the windows topic area.

But I don't think you'll get an answer there either.
0
 
ambienceCommented:
this would only work on Win9x i think (as far as i remember) but for NT you have better options through the use of NTFS security (to some extent) :)
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

 
paulburnsAuthor Commented:
I just tested that method and it does work under Windows 9x but not under NT (I am able to copy the file using Explorer under NT). Is there a solution that will work on both platforms?
0
 
paulburnsAuthor Commented:
Is the email notification working on this site? I haven't received a single notif on any of those comments.
0
 
paulburnsAuthor Commented:
I don't why I posted this in the C++ forum, too early in the day I guess.

I'll repost it in Windows 98 and Windows NT forums, so please go there if you want to comment.
0
 
AxterCommented:
There's nothing wrong with posting this in C++ topic area.
When I have a question that can apply to multiple topics, I usually post it in one topic with points, and then post a zero point question in the other topic(s) with a link to the points question.
0
 
AxterCommented:
What is the purpose of making the file uncopyable?

What is your goal?

We might be able to suggest something better to achieve your desired goal.
0
 
nietodCommented:
>>There's nothing wrong with posting this in C++ topic area.
You could also post it in in the health and nutrition topic area.  But the fact is that the best Windows programming support is in the Windows programming topic area and the question itself has nothing to do with C++.
0
 
AxterCommented:
If you're using C++ code to do it, then it would have something to do with C++.
0
 
AxterCommented:
One of the reasons I like using EE instead of the newsgroup, is because you don't have a whole bunch of Topic police here.
As long as the question is reasonably related to the topic area, then users are free to ask questions in the topic area.

If the question has nothing what so ever to do with the topic, then I can see deferring a questioner to a different topic area.

Please do not become a topic police here.  That's counter productive in the newsgroup, and we don't need that in EE.
0
 
nietodCommented:
The question regards a technique, not a language.  The answer will not be language dependant.   Yes, it will have to be inimplimented in some language, but the same technique will be used in any language.  i.e. writing a novel in English is not really any different than writting a novel in chinese.  The skills (developing a plot, characters, creative descriptions, etc) are the same.  

In this case, the most knowlegable experts pn the topic are in the Windows topic area.  
0
 
AxterCommented:
>>The question regards a technique, not a language.  
You can say that about almost any question.
So the above comment is really pointless.
0
 
AxterCommented:
If I want a solution for a problem, and I want a C++ solution, I'm going to go to a C++ topic area.
I don't want to go to a windows topic area, where I might get an example solution from a C expert.
I want the solution in the language I'm programming in, and I want to get in from an expert who's familiar with that language.
0
 
paulburnsAuthor Commented:
Alrighty, this is a bit of a mess - I've got this question in several topic areas now.

Anyway... what I am trying to do is put some information onto a floppy disk that cannot be copied using a diskcopy or Explorer.

I initially thought of two methods - the "uncopyable" file as mentioned or using some part of the boot sector. But I am not too sure about the second method as virus scanners may complain about it and also I have no idea how to write to the boot sector, where I would store my information, or even if it's possible under 9x/NT.

Any ideas welcome.
0
 
AxterCommented:
Did you try stevenlewis's method?
0
 
paulburnsAuthor Commented:
yes, that works under 9x but not NT
0
 
stevenlewisCommented:
On NT, put it in it's own folder, and remove the everyone group from having permissions (do not give no access to the everyone group), but first give yourself full control, and no one will be able to copy or even access it (NTFS only)
0
 
stevenlewisCommented:
paulburns Glad I could be of some help
Steve
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.