Solved

How do you Xcopy a "Access Denied File" wino386.swp

Posted on 1998-12-21
21
320 Views
Last Modified: 2010-05-03
I want to Copy the Win95 swap file (win386.swp) in my app
I have seen other programs that do this, does any one know how to do it in VB5 Ent Editition? also I would like to copy all the files that xcopy can not. any suggestion are welcome
0
Comment
Question by:rhop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
  • 4
  • +4
21 Comments
 

Author Comment

by:rhop
ID: 1451804
Edited text of question
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1451805
You have seen other application do it. Which ones?
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1451806
Just only for curiosity: ¿what d'you need the .SWP file for?

Regarding your comment, I think the only way to read .SWP file while it's opened by Win, is thru direct access, reading sectors were file is stored. That implies to read the FAT, something VB doesn't let you.

0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:mark2150
ID: 1451807
The OS won't let you copy a file that's being written to. Period.

M

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1451808
I think we all agree upon that it is not possible. The sector reading is not an option either since the OS will kill your application as soon as you try.
So why do you need to do it, maybe we can solve your problem.
Otherwise, you will get the answer NOT
0
 
LVL 1

Expert Comment

by:mathies
ID: 1451809
You don't have to copy the swap file in you application to be able to access it.
Win95 automaticly use Swap file if it don't have enough memory to Process.
You can't choose if you want or don't want to use swap file.  Win95 made this automaticly.
Xcopy use Xms or Ems memory (only base memory or all available memory). In win95, you don't have to think about memory.  All memory available will be used.


0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1451810
Hmm, the swap file will be bigger, the more memory you use. When copy the swap file the memory use will me more and the swapfile will be bigger.
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1451811
Why in gods name would you need to copy the swap file? It's transient for crying out loud! And as Mirkwood pointed out, the act of copying it would *access* it so you'ld be in an expanding memory loop where you'ld run out of some resource in short order.

Original answer of "No can do" is correct.

M

0
 
LVL 3

Expert Comment

by:vikiing
ID: 1451812
Mirkwood: swapfile size can be fixed or variable. If you go to Control Panel --> System --> Performance --> Virtual memory, you can set the limits you want, and not letting Wincrap manage it at its desire.

0
 
LVL 12

Expert Comment

by:mark2150
ID: 1451813
Isnt the size of the file that Mirkwood was referring to, only that it is *live* during a file copy!

M
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1451814
>Hmm, the swap file will be bigger, the more memory you use

¿What does that phrase suggest you?

As you can fix the swap filesize, no matter how much memory I have, that's why I put that comment.
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1451815
What I was trying to say is that it is impossible to copy the swp file in the current state since copying the swapfile will cause the swapfile to change.
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1451816
That's depend on how you do the job; if you can pick up the sectors where swapfile resides (i.e.: by reading the FAT), then you can direct-access the whole chain of sectors w/o letting know to Windoze.

Anyway, there's no guarantee Win doesn't make file change by another reason.
0
 
LVL 1

Expert Comment

by:raider187
ID: 1451817
Basic principals, and by the way Happy Holidays...
Thats why I want to copy the swap file, what kind of commit is "why do I want to"  I have around a 1000 pc's to backup and I have xcopied every file, minus the swap file and tried to recover a users system, and the result was bad, TIME is the issue it's alot eaiser to recover a complete system than it is to put it back together in pieces.  After I do the 1k lot of computers, I'll have around 1200 more to follow in the next 6 months.    
0
 

Author Comment

by:rhop
ID: 1451818
I agree with raider and I'm glad I'm not the only person out there with this problem :(
0
 
LVL 3

Expert Comment

by:vikiing
ID: 1451819
There's no more unuseful data to backup than swapfile. If you want to backup an entire machine, of course, you must copy every single bit of all files you have, **EXCEPT** swapfile.

As it contains temporary Windoze data, copies of memory regions and a big etcetera, it really serves to no purpose.

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1451820
I would be a lot more concerned about the registry in your cases. Read a good book about making a backup. Vikiing is more than 100% right.
0
 
LVL 1

Expert Comment

by:dpuckett
ID: 1451821
The swap file is NOT required to be restored. <-period

I've moved win95 around all over the place on my own machine and other machines.. drive to drive.. partition to partition.. never worrying 'bout the swap file.  moving NT around on the other hand.. doesn't move so well.

Once I had a machine whine about the swap file, but ceating a new zero byte swap file before starting win cured it.

forgive me for echoing others.. I'm bored
0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1451822
Maybe throp, we should just close this session and except that the answer that it is not possible is the right answer.
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 200 total points
ID: 1451823
Yeah, we clone systems all the time when shifting users from one machine to another and we *NEVER* copy the swap file (or any of the ~*.TMP files for that matter) and this causes no problems.

If you're having difficulties then there is another problem elsewhere.

M

0
 

Author Comment

by:rhop
ID: 1451824
Thanks For your Input (everyone)  I'm very greatfull for your responses.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 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