Solved

Creating an uncopyable file

Posted on 2001-06-05
19
1,120 Views
Last Modified: 2008-01-09
"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?
0
Comment
Question by:paulburns
  • 7
  • 5
  • 3
  • +2
19 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 6158284
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
 
LVL 41

Accepted Solution

by:
stevenlewis earned 100 total points
ID: 6158353
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
 
LVL 22

Expert Comment

by:ambience
ID: 6158459
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
 
LVL 2

Author Comment

by:paulburns
ID: 6158497
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
 
LVL 2

Author Comment

by:paulburns
ID: 6158507
Is the email notification working on this site? I haven't received a single notif on any of those comments.
0
 
LVL 2

Author Comment

by:paulburns
ID: 6158527
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
 
LVL 30

Expert Comment

by:Axter
ID: 6160136
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
 
LVL 30

Expert Comment

by:Axter
ID: 6160146
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
 
LVL 22

Expert Comment

by:nietod
ID: 6160164
>>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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 30

Expert Comment

by:Axter
ID: 6160227
If you're using C++ code to do it, then it would have something to do with C++.
0
 
LVL 30

Expert Comment

by:Axter
ID: 6160263
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
 
LVL 22

Expert Comment

by:nietod
ID: 6160272
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
 
LVL 30

Expert Comment

by:Axter
ID: 6160349
>>The question regards a technique, not a language.  
You can say that about almost any question.
So the above comment is really pointless.
0
 
LVL 30

Expert Comment

by:Axter
ID: 6160361
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
 
LVL 2

Author Comment

by:paulburns
ID: 6162137
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
 
LVL 30

Expert Comment

by:Axter
ID: 6162146
Did you try stevenlewis's method?
0
 
LVL 2

Author Comment

by:paulburns
ID: 6162156
yes, that works under 9x but not NT
0
 
LVL 41

Expert Comment

by:stevenlewis
ID: 6162232
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
 
LVL 41

Expert Comment

by:stevenlewis
ID: 6165980
paulburns Glad I could be of some help
Steve
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now