Home All Groups Group Topic Archive Search About
Author
6 Dec 2006 5:44 PM
reidarT
I have a project with an installfile-folder with files.
I want to copy files from this folder to another location like

Sorce = "InstallFiles\file.txt"
Destination="c:\...\file.txt"
FileCopy (Source,Destination)

I seems like I need the whole source path to make this work.
When I publish this application I don't know where it is located, so to add
the complete path is difficult.
Is there a way to solv this problem?
reidarT

Author
6 Dec 2006 8:06 PM
P. Di Stolfo
Hi,

you can easily find out where your application is located by using
My.Application.Info.DirectoryPath.

So you could write
My.Application.Info.DirectoryPath & "\file.txt"
as the source.

Hope this helps.
PDS

Show quoteHide quote
"reidarT" wrote:

> I have a project with an installfile-folder with files.
> I want to copy files from this folder to another location like
>
> Sorce = "InstallFiles\file.txt"
> Destination="c:\...\file.txt"
> FileCopy (Source,Destination)
>
> I seems like I need the whole source path to make this work.
> When I publish this application I don't know where it is located, so to add
> the complete path is difficult.
> Is there a way to solv this problem?
> reidarT
>
>
>