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

[RESOLVED] vb.net file not found (but it is there)

$
0
0
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

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

Viewing all articles
Browse latest Browse all 27347

Trending Articles



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