0
down vote
favorite
i thought this would be simple but obviously not
i'm trying to copy a file in the appdata folder - specifically the templates folder
i get the following
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.VisualBasic.dll
Additional information: Could not find file 'C:\Users\EAZIE\AppData\Roaming\Microsoft\Windows\Templates\Normal.dotm'.
i know the file is there i can move it manually. i can run the code on other files ok
i've also run the program with administrative rights
down vote
favorite
i thought this would be simple but obviously not
i'm trying to copy a file in the appdata folder - specifically the templates folder
Code:
Dim path As String
path = Environment.GetFolderPath(Environment.SpecialFolder.templates)
path = path & "\Normal.dotm"
My.Computer.FileSystem.CopyFile(path, "c:\test\normal.dotm", True)
i get the following
An unhandled exception of type 'System.IO.FileNotFoundException' occurred in Microsoft.VisualBasic.dll
Additional information: Could not find file 'C:\Users\EAZIE\AppData\Roaming\Microsoft\Windows\Templates\Normal.dotm'.
i know the file is there i can move it manually. i can run the code on other files ok
i've also run the program with administrative rights