Re: Copy File

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Dorian Chalom (DChalom_at_Comcast.net)
Date: 01/22/05

  • Next message: Dorian Chalom: "Re: Copy File"
    Date: Sat, 22 Jan 2005 15:42:40 -0500
    
    

    Sorry so now you have me totally confused....

    What would be the correct most effiecent way for me to do this?

    cFile = "C:\EFILE\Proof of Claim.PDF"
    cFile2 = "C:\DOCUMENTS AND SETTINGS\DORIAN\MY
    DOCUMENTS\DEVELOPMENT\EFILE\Wright, Dayna Elizabeth - 04-12295-jcs\Proof of
    Claim.PDF"

    COPY FILE cFile TO cFile2

    "Cindy Winegarden" <cindy_winegarden@msn.com> wrote in message
    news:%23VvmXILAFHA.3820@TK2MSFTNGP11.phx.gbl...
    > Hi Dorian,
    >
    > No. You're mixing the two solutions.
    >
    > cFile1 and cFile2 are string variables that contain a path and file name -
    > something like "c:\My Documents\Visual FoxPro Projects\Test.dbf" and they
    > may or may not have spaces in the strings.
    >
    > For any VFP expression that represents a name such as the X and Y in COPY
    > FILE X TO Y you can replace the name with a "name expression" which is a
    > string variable that contains a name of some sort. For example it can be a
    > simple file name or a path and file name. The "name expression" is
    > represented in code with parentheses around the variable, so the result is
    > COPY FILE (cFile1) TO (cFile2) .
    >
    > Using square brackets as you have below would make the contents inside a
    > quoted string, since square brackets are an alternative to single and
    > double quotes in VFP. So, it would be like saying COPY FILE "(cFile1)" TO
    > "(cFile2)", denoting that the file names began and ended with parentheses
    > as Fred said.
    >
    > --
    > Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
    > cindy_winegarden@msn.com www.cindywinegarden.com
    >
    >
    > "Dorian Chalom" <DChalom@Comcast.net> wrote in message
    > news:OzqIGwBAFHA.204@TK2MSFTNGP10.phx.gbl...
    >> So the syntax of
    >> COPY FILE [(cFile)] TO [(cFile2)]
    >>
    >> would be correct?
    >
    >>>> "Dorian Chalom" <DChalom@Comcast.net> wrote in message
    >>>> news:e9fYpBAAFHA.2192@TK2MSFTNGP14.phx.gbl...
    >>>>> COPY FILE [&cFile.] TO [&cFile2.]
    >
    >


  • Next message: Dorian Chalom: "Re: Copy File"

    Relevant Pages

    • Re: Copy File
      ... Changed it to COPY to cFile2) and it worked. ... I could of swore I tested that way originally. ... > string variable that contains a name of some sort. ... > Using square brackets as you have below would make the contents inside a ...
      (microsoft.public.fox.vfp.forms)
    • RE: regular expressions. Order matters?
      ... order does matter in a Regex. ... That way, if it can enclose the word in square brackets, it will. ... > I am trying to create a regular expression that will let me know if a string ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: puzzling results from dlookup
      ... Since the field name begins with a number, use square brackets around the ... Year is a VBA function, and it will confuse Access if you use it as a ... thinks is a missing operator. ... Criteria string is correctly formed. ...
      (microsoft.public.access.formscoding)
    • Re: Possible to do a "wildcard replace" in Word?
      ... > strip off the square brackets and replace them with a preceding ... Your search string should be ... "type a wildcard character" inside that article. ... Now you see why I'm famous for rubbishing 'help'? ...
      (microsoft.public.mac.office.word)
    • Re: validate a form and choosing a link
      ... instead of voc, it works! ... then type-converting the result into a string to give the property ... is an Identifier, which means a scope chain lookup of the Identifier ... What you want inside the square brackets is an expression ...
      (comp.lang.javascript)