1. problem with system()

Hi, all.

I'm trying to copy a text file from one directory into the directory from which
the Euphoria program is executing. Have run   SET CAUSEWAY=LOWMEM:80   (even up
to 120)
before running ex.  In all cases, the copied files contains 0 bytes. The source
file contains 10,430 bytes.

Ive tried every thing I can think of, with no difference in the results; always
an empty file.

No doubt, it's something obvious that I'm doing wrong. Any suggestions will be
much appreciated.

Pertinent portion of the program follows.
-----------------------------------------------------------------------------------------------------------------
GetMaFile = DownLoadDir&MaFile     -- contents = "\\A5\\DOWNLOAD\\MA083100.TXT"
printf(1,"\n %s \n",{GetMaFile})            -- just to verify.  (It is OK)

DosCommand = "copy "&GetMaFile
printf(1,"\n %s \n",{DosCommand})      -- just to verify.  (It is OK)
system(DosCommand,0)                       -- copied file is empty (0 bytes; s/b
10,430)

   -- try hard-coding it...
system("copy C:\\A5\\DOWNLOAD\\MA083100.TXT  C:\\DATA\\MA083100.TXT",2) -- 0
bytes
------------------------------------------------------------------------------------------------------------------

Thanks.

Jim

new topic     » topic index » view message » categorize

2. Re: problem with system()

Try this:

  procedure CopyFile(sequence PathFrom,sequence PathTo)
    --PathFrom and PathTo are respective file paths
    --such as "c:\\euphoria\\files\\file1.txt"

    system("copy "&34&PathFrom&34&" "&34&PathTo&34,0)  --  smile

  end procedure


 --Al

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu