Solved

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

Posted on 1998-12-21
21
312 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
  • 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
 
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
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 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

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

18 Experts available now in Live!

Get 1:1 Help Now