×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

copy file

copy file

copy file

(OP)
I want to make a duplicate copy a file that I am currently loading.

I use the getfile() to get the file name.
code is like this:

spoolfile = getfile(.....)

when i say:
 copy file spoolfile.dat to test.dat
I get an error msg saying spoolfile doesn't exist.

One more thing is there any way I can specify  the location where I want to copy this file.

RE: copy file

After using the GETFILE() function, 'spoolfile' will contain the name of the file.  Example:

spoolfile = "C:\PROGRAM FILES\MICROSOFT VISUAL STUDIO\VFP98\CONFIG.FPW"

You will need to do:

COPY FILE (spoolfile) TO test.dat
or
COPY FILE (spoolfile) TO c:\backup\test.dat
or
COPY FILE (spoolfile) TO GETFILE()

Dave S.

RE: copy file

COPY FILE (spoolfile) to C:\MyFolder\test.dat

Jim

RE: copy file

(OP)
can i rename it as a particular name.  say if I want it to be name it as a specific value from the table.  I get that value and store it in a global variable.
something like:

copy file (spoolfile) to c:\myfolder\(varible).dat

RE: copy file

filename = 'c:\myfolder\' + ALLTRIM(variable) + '.dat'
COPY FILE (spoolfile) TO (filename)

Jim

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close