Re: Prompt to overwrite file



Could you post the exact message they're getting? This looks like a peculiar coincidental problem caused by something else; the script statement you're posting will indeed attempt to overwrite without prompting, and if it can't due to a locked/missing file or insufficient permissions, it will simply fail - no prompting.

Get them to tell you precisely what the error message says; if the end user is in a remote location or can't tell you in real time, have them do a screen capture if possible. I'm not certain what the problem really is, but there's no mechanism for this copy operation to raise an overwrite prompt dialog.

"Bill Mosca, MS Access MVP" <billmosca@xxxxxxxxxx> wrote in message news:#LslB3ouIHA.5832@xxxxxxxxxxxxxxxxxxxxxxx
I have a script that my users run to update a local file on a Win XP Pro SP2 machine. Nothing fancy, but for some reason, one of my users gets a prompt asking if she wants to replace the existing file. As far as I know, none of my other users get this prompt.

Set fs = WScript.CreateObject("Scripting.FileSystemObject")
fs.CopyFile cSVRPATH & "\" & cTXTFILE, cLOCPATH & "\", True

Isn't the overwrite argument supposed to suppress the prompt? And what setting does she have that would ignore that argument?

--
Bill Mosca, MS Access MVP
http://www.thatlldoit.com
http://mvp.support.microsoft.com/profile/Bill.Mosca
http://tech.groups.yahoo.com/group/MS_Access_Professionals





.



Relevant Pages

  • Re: Prompt to overwrite file
    ... folder to another. ... It's like I never included the no prompt argument. ... peculiar coincidental problem caused by something else; ... but there's no mechanism for this copy operation to raise an overwrite ...
    (microsoft.public.scripting.wsh)
  • Re: Prompt to overwrite file
    ... folder to another. ... It's like I never included the no prompt argument. ... peculiar coincidental problem caused by something else; ... but there's no mechanism for this copy operation to raise an overwrite ...
    (microsoft.public.scripting.wsh)
  • Re: Overwriting an existing Excel workbook
    ... *always* got an overwrite prompt from VBA with the test code that I ... Dave Peterson schreef: ... And the Conflictresolution setting has to do with shared workbooks. ...
    (microsoft.public.excel.misc)
  • Re: excel object
    ... Thanks for the reply but which one do I use to overwrite an existing file ... without a prompt. ... This script will be scheduled. ... In order to crete an excel object do I have to have excel ...
    (microsoft.public.scripting.vbscript)
  • Re: SaveFileDialog.ShowDialog() returns Cancel when Yes to overwri
    ... I am using the SaveFileDialog out of a *.exe that does not have a GUI ... The workaround I found is to just disable the overwrite prompt ... a bug in your own code that makes the return value looks bad when it is ...
    (microsoft.public.dotnet.languages.vb)

Loading