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

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
rhopAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
mark2150Connect With a Mentor Commented:
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
 
rhopAuthor Commented:
Edited text of question
0
 
MirkwoodCommented:
You have seen other application do it. Which ones?
0
Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

 
vikiingCommented:
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
 
mark2150Commented:
The OS won't let you copy a file that's being written to. Period.

M

0
 
MirkwoodCommented:
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
 
mathiesCommented:
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
 
MirkwoodCommented:
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
 
mark2150Commented:
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
 
vikiingCommented:
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
 
mark2150Commented:
Isnt the size of the file that Mirkwood was referring to, only that it is *live* during a file copy!

M
0
 
vikiingCommented:
>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
 
MirkwoodCommented:
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
 
vikiingCommented:
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
 
raider187Commented:
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
 
rhopAuthor Commented:
I agree with raider and I'm glad I'm not the only person out there with this problem :(
0
 
vikiingCommented:
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
 
MirkwoodCommented:
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
 
dpuckettCommented:
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
 
MirkwoodCommented:
Maybe throp, we should just close this session and except that the answer that it is not possible is the right answer.
0
 
rhopAuthor Commented:
Thanks For your Input (everyone)  I'm very greatfull for your responses.
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.