I can copy the folder to a USB drive without any problems
Code:
My.Computer.FileSystem.CopyDirectory(sourceFolder, destination & Me.TextBox1.Text & "StickFrameExpress\StickFrameExpress", Microsoft.VisualBasic.FileIO.UIOption.AllDialogs, FileIO.UICancelOption.ThrowException)
but if i try to zip the folder so i can upload to my ftp site i am getting a access denied error message.

Code:
System.UnauthorizedAccessException was unhandled
  Message="Access to the path 'C:\Documents and Settings\toe\My Documents\Visual Studio 2005\Projects\StickFrameExpress' is denied."
  Source="mscorlib"
  StackTrace:
       at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy)
       at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
       at Microsoft.VisualBasic.FileIO.FileSystem.WriteAllBytes(String file, Byte[] data, Boolean append)
       at Microsoft.VisualBasic.MyServices.FileSystemProxy.WriteAllBytes(String file, Byte[] data, Boolean append)
       at AutoBackup.Form1.btnBackup_Click(Object sender, EventArgs e) in C:\Documents and Settings\toe\My Documents\Visual Studio 2005\Projects\AutoBackup\AutoBackup\Form1.vb:line 89
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnClick(EventArgs e)
       at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
       at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ButtonBase.WndProc(Message& m)
       at System.Windows.Forms.Button.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.Run(ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at AutoBackup.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
When i check the folder attributes they are set to read only so i took the tick out and applied, all the attributes changed according to the notification but if i close the folder property window then open it again the folder attribute read only is ticked?

zip code
Code:
    'get folder to zip
            Dim srcfolderString As String = Me.txtSourceFolder.Text
            Dim dstfolderString As String = "C:\Documents and Settings\toe\My Documents\Visual Studio 2005\Projects\StickFrameExpress"
            'create empty zip file
            Dim fileContents() As Byte = {80, 75, 5, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
            My.Computer.FileSystem.WriteAllBytes(dstfolderString, fileContents, False)
            Dim objShell As New Shell32.ShellClass
            Dim objFolderSrc As Shell32.Folder
            Dim objFolderDst As Shell32.Folder
            Dim objFolderItems As Shell32.FolderItems
            objFolderSrc = objShell.NameSpace(srcfolderString)
            objFolderDst = objShell.NameSpace(dstfolderString)
            objFolderItems = objFolderSrc.Items
            objFolderDst.CopyHere(objFolderItems, 20)
error highlites this line
Code:
My.Computer.FileSystem.WriteAllBytes(dstfolderString, fileContents, False)
I checked the error in the help:
Troubleshooting Exceptions: System.UnauthorizedAccessException
But alas i don't understand how to correct it.

regards

toe