Home > Software engineering >  Help to look at, the copy where language is wrong..
Help to look at, the copy where language is wrong..

Time:09-24

 Private Sub Command2_Click () 
Dim SourceFile, DestinationFile
SourceFile=App. Path & amp; "\ 1. TXT"
DestinationFile="c: "
If Check1. Value=https://bbs.csdn.net/topics/1 Then
FileCopy SourceFile, DestinationFile
End the If
End Sub

Prompt can not find a file path, I watched the SourceFile debugging, DestinationFile two values are correct

CodePudding user response:

 
SourceFile=App. Path & amp; "\ 1. TXT"
DestinationFile="c: \ 1. TXT"
FileCopy SourceFile, DestinationFile

CodePudding user response:

Under the Windows 7 system disk access control is more rigorous, ordinary permissions cannot be in C: \ write files on the homepage,

CodePudding user response:

In D: \ try again,

CodePudding user response:

If must disk C, please to administrator privileges to run the program

CodePudding user response:

This is an old problem, if it is in under the root directory, need to get a "", if it is two certainly not right,

I tend to be the if len (app. Path)=3 then SourceFile=app. Path & amp; "1. TXT"

You can try
  • Related