I have a backup program that does great on everything, it backs up all files in every folder with all attributes and path names and time ect. zipping them up and copying them to a CD, spanning if need be. This program even can run in DOS, so if you just happen one day to have a trashed system you can boot from your boot disk and put the first CD in and type setup and your system will be restored. I am almost done. but out came another MS problem. why is windows stopping me from making copys of some file, just becouse it is using them? I have seen other programs copy files windows is using. I just don't know how it is being done. does anyone know of some way to get windows to give it up????? Thanks in advance...
I never tried this from code, but I kinda remeber having similar problems right in good old file explorer. So... I'd copy the stuck file (drag and drop), then I could do anything with that copy. Maybe a shell to a nice old command line "copy" would do the trick.
He he, that always what I do to Ernie :) Works in all versions of windows too ;) bitRAKE
Well, sorry to say I gave that a try cuz I am desp. I used a good old shell and it had a sharring violation. so it looks like windows has not learned to share well with others. I don't want to make this an app that you have to use in DOS to make the backups. I only want the other half to work in DOS, cuz after all when you need your backup or restore CD's it's cuz your hard drive is empty and your redoing your system, so you have to do that part in DOS. Now this program would be funny for me to tell people after they made there restore disk that they now have to take this list and go into dos mode and copy these files onto there CD. cuz, Cuz this program CANT.. don't sound very productive to me. I will keep looking in my MSDN for something to over ride this sharring thing. I must teach windows that sharing is a good thing...
I noticed Ernie mentioned using copy/paste to get around the sharing problem. Have you tried that?
The only thing stopping you from copying files with exclusive locks, is the windows functions themselves. There is nothing physically stopping you, just that windows decides you're not allowed to. So, if you ignore what windows says and go behind it then it should be fine. For this I think you'll need to use a vxd though; and then code a file access function for yourself. Have fun ;->
No VXD should be needed. Windows overwrites these files during updates, and you should be able to research that process and find how Windows does it. bitRAKE
did you ever try SHFileOperation? I managed it that my program copies its exe to another folder. but my program is kind of used by windows, too, isn't it? perhaps that helps. bye
SHFileOperation will copy any file even the registry. Thats what I use in FileMan Ewayne
Thanks I got it working now. I used SHFileOperation as suggested and everthing is working ok. So thanks to ALL of you, and I really think we all have a great thing going on here at this site.... people helping people. it seems that the ASM Group does help opthers more then I have seen on any other forum, in anyother Language, Keep up the good work people.... And Thanks Again.....