Hi Everyone!

I am trying to copy a shortcut file from a directory on
my network to the desktop of a users computer. The problem
I am having is that under Windows 2000 a users desktop
directory is under the directory Documents and Settings.
When I try to get FoxPro to copy to c:\documents and
settings\kevin\desktop\ I keep getting invalid directory
or path errors. Anyone have any ideas on how to copy to
this directory? Also I can't string a path name together.
Example :
k = kevin
path = 'c:\documents and settings\'+'k'+'\desktop\
copy file k:\test\sbtest.lnk to path - This will not work
eithier

Thanks

Re: Copying Files by Eric

Eric
Mon Sep 08 14:07:13 CDT 2003

Hello, Kevin!
You wrote on Mon, 8 Sep 2003 11:55:27 -0700:

KM> I am trying to copy a shortcut file from a directory on
KM> my network to the desktop of a users computer. The problem
KM> I am having is that under Windows 2000 a users desktop
KM> directory is under the directory Documents and Settings.
KM> When I try to get FoxPro to copy to c:\documents and
KM> settings\kevin\desktop\ I keep getting invalid directory
KM> or path errors. Anyone have any ideas on how to copy to
KM> this directory? Also I can't string a path name together.
KM> Example :
KM> k = kevin
KM> path = 'c:\documents and settings\'+'k'+'\desktop\
KM> copy file k:\test\sbtest.lnk to path - This will not work
KM> eithier

Try:
COPY FILE "c:\documents and settings\kevin\desktop\myfile.txt" TO
"d:\otherfolder\long path\bla bla\myfile.txt"
or
k = 'kevin'
lcPath = 'c:\documents and settings\'+k+'\desktop\'
COPY FILE "k:\test\sbtest.lnk" TO (lcPath)
--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Re: Copying Files by Kevin

Kevin
Mon Sep 08 14:28:04 CDT 2003

Thanks Eric! The first option works fine.
>-----Original Message-----
>Hello, Kevin!
>You wrote on Mon, 8 Sep 2003 11:55:27 -0700:
>
> KM> I am trying to copy a shortcut file from a
directory on
> KM> my network to the desktop of a users computer. The
problem
> KM> I am having is that under Windows 2000 a users
desktop
> KM> directory is under the directory Documents and
Settings.
> KM> When I try to get FoxPro to copy to c:\documents and
> KM> settings\kevin\desktop\ I keep getting invalid
directory
> KM> or path errors. Anyone have any ideas on how to copy
to
> KM> this directory? Also I can't string a path name
together.
> KM> Example :
> KM> k = kevin
> KM> path = 'c:\documents and settings\'+'k'+'\desktop\
> KM> copy file k:\test\sbtest.lnk to path - This will not
work
> KM> eithier
>
>Try:
>COPY FILE "c:\documents and
settings\kevin\desktop\myfile.txt" TO
>"d:\otherfolder\long path\bla bla\myfile.txt"
>or
>k = 'kevin'
>lcPath = 'c:\documents and settings\'+k+'\desktop\'
>COPY FILE "k:\test\sbtest.lnk" TO (lcPath)
>--
>Eric den Doop
>www.foxite.com - The Home Of The Visual FoxPro Experts -
Powered By VFP8
>
>
>.
>