|
-
March 21st, 2001, 10:31 AM
#1
FileSystemObject Error
I am trying to use the FileSystemObject to back up a user's profile to the d:\ drive on a partitioned hard drive. I keep getting a permission denied error when trying to write over the current folder. I can't even delete the folder and create it again without getting this error. I've tried numerous combination of Copy, CopyFolder etc. with the same results Any suggestions???
on error resume next
Screen.MousePointer = vbHourglass
DoEvents
Call GetUser 'to get UserId
DoEvents
'*******************Profile Backup**************************
Dim fso as new FileSystemObject
Dim fs as Folder
Dim sPath as string
set fso = new FileSystemObject
sPath = "c:\winnt\profiles\" & UserId & "\Application Data"
If fso.FolderExists then fso.DeleteFolder ("d:\Profile Backup") 'error permission denied
If Not fso.FolderExits then fso.CreateFolder ("d:\Profile Backup")
If Not fso.FolderExists then fso.CreateFolder ("d:\Profile Backup\Application Data")
fso.CopyFolder sPath, "d:\Profile Backup\Application Data" 'error Permission denied
set fso = nothing
set fs = nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|