Need help with a batch file problem

Archived from groups: microsoft.public.windowsxp.newusers (More info?)

I run a specific batch file at startup that attempts to copy a file to
replace one that is under control of a running program. I get the message
"The process cannot access the file because it is being used by another
process." How do I successfully write the file? I know that the way you
are supposed to do it is to close the program, make the transfer then
restart the program. But how do you do that when you don't know the program
and you don't know how it starts in the first place.

Don J

-----------------------------------------------------------------
1 answer Last reply
More about need batch file problem
  1. Archived from groups: microsoft.public.windowsxp.newusers (More info?)

    Hi,

    Download filemon from www.sysinternals.com to figure out what program or
    process is controlling the file. A batch file in the startup folder runs
    very late in the startup routine, you may need to change your strategy to
    affect the file before it comes into use.

    --
    Best of Luck,

    Rick Rogers, aka "Nutcase" - Microsoft MVP
    http://mvp.support.microsoft.com/
    Associate Expert - WindowsXP Expert Zone
    www.microsoft.com/windowsxp/expertzone
    Windows help - www.rickrogers.org

    "Don J" <dej8800@comcast.net> wrote in message
    news:bJadnRBnLKogyV7fRVn-3Q@comcast.com...
    >I run a specific batch file at startup that attempts to copy a file to
    >replace one that is under control of a running program. I get the message
    >"The process cannot access the file because it is being used by another
    >process." How do I successfully write the file? I know that the way you
    >are supposed to do it is to close the program, make the transfer then
    >restart the program. But how do you do that when you don't know the
    >program and you don't know how it starts in the first place.
    >
    > Don J
    >
    > -----------------------------------------------------------------
    >
    >
Ask a new question

Read More

Microsoft Windows XP