Copying a file that is open?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Paul Bromley

    #1

    Copying a file that is open?

    This may seem a stupid question, but is it possible to copy a file that is
    open? I have written an application to dispaly TIFF, RTF and other file
    formats. I now need to add a function that will copy a file being displayed
    to another directory, whilct leaving the original behind? Can anyone suggest
    a way that I might do this? It is important for my user that I display the
    file. I use a 3rd party control for the TIFF and the MS DSOFramer control
    for the rtf file. Thinking about this as I write, I think that I may be able
    to do a 'save' on these 2 file types using the relevant controls. However
    there are other files that I cannot do this with. Presumably I have to close
    the files in my code, then copy, then open them again, or is ther an easier
    way of doing this??

    Many thanks

    Paul Bromley


  • Paul Bromley

    #2
    Re: Copying a file that is open?

    Stupid Me!!!

    I was trying to copy to a Network drive that I only had read properties on.

    Sorry for bothering you.

    Paul Bromley


    "Paul Bromley" <flyfisher@dsl. pipex.com> wrote in message
    news:uuCmMT%231 FHA.3120@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    > This may seem a stupid question, but is it possible to copy a file that is
    > open? I have written an application to dispaly TIFF, RTF and other file
    > formats. I now need to add a function that will copy a file being[/color]
    displayed[color=blue]
    > to another directory, whilct leaving the original behind? Can anyone[/color]
    suggest[color=blue]
    > a way that I might do this? It is important for my user that I display the
    > file. I use a 3rd party control for the TIFF and the MS DSOFramer control
    > for the rtf file. Thinking about this as I write, I think that I may be[/color]
    able[color=blue]
    > to do a 'save' on these 2 file types using the relevant controls. However
    > there are other files that I cannot do this with. Presumably I have to[/color]
    close[color=blue]
    > the files in my code, then copy, then open them again, or is ther an[/color]
    easier[color=blue]
    > way of doing this??
    >
    > Many thanks
    >
    > Paul Bromley
    >
    >[/color]


    Comment

    • webmaster@visionforceweb.com

      #3
      Re: Copying a file that is open?

      Oh, well just in case you need it, you could use:
      1. FileSystemObjec t (COM) - known as Microsoft Scripting Runtime
      2. The System.IO namespace in .NET

      *************** *************** *************** *************** **********
      Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
      Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...

      Comment

      Working...