These days to do a project, is to write a statement, the D-disk files all moved to the E disk, in the local XP environment test is very good.
However, after you put it on the Windows 2003 server, you are prompted for insufficient permissions.
My IIS Web site directory in D, and E is just a new volume, some files are very large and many, but d not enough to use, so out of this unwise.
Baidu a bit, a lot of such problems, but is to increase the permissions of e-disk, or the E-disk as a virtual directory.
But it doesn't work, so remind, the only difference is that I use dynamic volume, and XP is the basic volume, I do not want to change the volume plate.
Finally found the following approach:
With the FSO MoveFile will appear insufficient permissions, so the code can not be executed.
So using CopyFile and deletefile to avoid unnecessary trouble.
That
Copy Code code as follows:
Set fso=createobject ("Scripting.FileSystemObject")
Fso. MoveFile "File path", "Target"
There is a problem with this.
Use:
Copy Code code as follows:
Set fso=createobject ("Scripting.FileSystemObject")
Fso. CopyFile "File path", "Target"
Fso. DeleteFile "File path"
So decisively solved the problem. Replication can not be moved.
4.30 Update
Later, Tinker, the original is not the issue of e-disk permissions, but the issue of D-disk permissions, that is, IIS Web site Directory permissions.
Add the Internet Guest account to D, plus an account that starts with IUSR_, which is an IIS account.
Then use the MoveFile and it's no problem.
If you want to move or delete a file, you should first check the source file's permissions, not the target file's permissions.
Online tutorials are really harmful.