B
Benjamin
My problem: I'd like to transfer some custom Files for our program to work on
site,
to the local Documents and settings folder of the individual computer user,
I'd like to avoid having to program in copy each and every file to the
location and use a copy folder command of some sort in VBA.
On-line I read that the CopyFolder function can't work on a read-only folder..
and it appears that the Application data folder is readonly...
And Ideas here....
I was using code:
AppData = (Environ("AppData")) & "\Autodesk\AutoCAD 2007\R17.0\enu"
FromPath2 = "M:\SETUP_USER\ApplicationData"
ToPath2 = AppData 'my variable for
'If Mrive Isn't Working Contact IT
If FSO.FolderExists(FromPath2) = False Then
MsgBox FromPath2 & " doesn't exist" & " Contact IT"
End If
'Copy Folder Fresh
FSO.CopyFolder FromPath2, ToPath2, False
Exit Sub
excerpt from:
http://www.devguru.com/technologies/vbscript/QuickRef/filesystemobject_copyfolder.html
The overwrite parameter is a Boolean. True allows the overwriting of
existing files in the destination, providing that the permissions on the
destination allow it ( if the destination is set as read-only, the CopyFolder
method will fail). An overwrite setting of False prevents existing files in
the destination from being overwritten.
site,
to the local Documents and settings folder of the individual computer user,
I'd like to avoid having to program in copy each and every file to the
location and use a copy folder command of some sort in VBA.
On-line I read that the CopyFolder function can't work on a read-only folder..
and it appears that the Application data folder is readonly...
And Ideas here....
I was using code:
AppData = (Environ("AppData")) & "\Autodesk\AutoCAD 2007\R17.0\enu"
FromPath2 = "M:\SETUP_USER\ApplicationData"
ToPath2 = AppData 'my variable for
'If Mrive Isn't Working Contact IT
If FSO.FolderExists(FromPath2) = False Then
MsgBox FromPath2 & " doesn't exist" & " Contact IT"
End If
'Copy Folder Fresh
FSO.CopyFolder FromPath2, ToPath2, False
Exit Sub
excerpt from:
http://www.devguru.com/technologies/vbscript/QuickRef/filesystemobject_copyfolder.html
The overwrite parameter is a Boolean. True allows the overwriting of
existing files in the destination, providing that the permissions on the
destination allow it ( if the destination is set as read-only, the CopyFolder
method will fail). An overwrite setting of False prevents existing files in
the destination from being overwritten.