I have very weird problem on my server, when I run this function:
Expand|Select|Wrap|Line Numbers
- Sub TransferFiles(departTemp_id,depart_id)
- 'Copy the files to the depart from the template
- '--
- Dim objFolder
- Dim objFSO
- Dim objFile
- Dim oFolder
- '--
- Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
- 'Get the folder object associated with the directory
- Set objFolder = objFSO.GetFolder(server.mappath("/
- image/"&departTemp_id&""))
- 'Loop through the Files collection
- For Each objFile in objFolder.Files
- if Not objFSO.FileExists(server.mappath("/
- image/"&depart_id&"/"&objFile.Name&"")) then
- objFSO.CopyFile server.mappath("/
- image/"&departTemp_id&"/"&objFile.Name&""),server.mappath("/
- image/"&depart_id&"/"&objFile.Name&""),False
- End If
- Next
- 'Loop through the Folder collection
- For Each oFolder in objFolder.SubFolders
- if Not objFSO.FolderExists(server.mappath("/
- image/"&depart_id&"/"&oFolder.Name&"")) then
- objFSO.CopyFolder server.mappath("/
- image/"&departTemp_id&"/"&oFolder.Name&""),server.mappath("/
- image/"&depart_id&"/"&oFolder.Name&""),False
- End If
- Next
- 'Clean up!
- Set objFolder = Nothing
- Set objFile = Nothing
- Set objFSO = Nothing
- End Sub
This is very weird,
I'm using ASP on windows server 2003 str with IIS 6.
Can any one help me with that?