Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27348

[RESOLVED] Copy from One Directory to Another

$
0
0
Hi,

Just trying to see if anyone can help with this.

Trying to copy a folder from one location to another and replace what's inside of the folder.

This is the original code, which works.
Code:

'My.Computer.FileSystem.CopyDirectory(Application.StartupPath & "/Resources/Data/Test/", "C:\ProgramData\Data\Test\", True)
I'm trying to use a code to determine if the location is "program data" for win 7 or application data for win xp
Code:

My.Computer.FileSystem.CopyDirectory(Application.StartupPath & "/Resources/Data/Test", "Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData" & "\Data\Test", True)
But this doesn't work? Any help would be appreciated.

Viewing all articles
Browse latest Browse all 27348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>