Solved

Creating an uncopyable file

Posted on 2001-06-05
19
1,121 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
maze travler 6 51
The dreaded error 1935 with VC++ 2008 Redistributable 12 88
How to convert MFC::CString to UTF8 wchar_t* 10 137
Issues with C++ Class 19 78
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
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 …
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…

932 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

9 Experts available now in Live!

Get 1:1 Help Now