Solved

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

Posted on 1998-12-21
21
310 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
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
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…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

759 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

26 Experts available now in Live!

Get 1:1 Help Now