The given path's format is not supported.

Posted on 2008-10-23
Last Modified: 2012-05-05
I'm trying out DotNetZip. Seems good but can't get it to work, even the simplest demo;  see code below and errors....tries various combinations but didn't work.

Crashes at zip.Save(). See for folders I've tried to save at.

Thanks in advance for help on this
Dim ZipToCreate As String = ""
        'The given path's format is not supported. 
        'Dim DirectoryToZip As String = Server.MapPath("~/App_Data/TextFiles")
        'Dim DirectoryToZip As String = Server.MapPath("~/App_Data/TextFiles/")
        'Dim DirectoryToZip As String = "C:\"
        'Dim DirectoryToZip As String = "C:\\"
        'Dim DirectoryToZip As String = "C:\temp"
        'Dim DirectoryToZip As String = "C:\temp\"
        'Dim DirectoryToZip As String = "C:\\temp\\"
        'Could not find a part of the path 'c:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\ddddddddddd'. 
        'Dim DirectoryToZip As String = "ddddddddddd"
        'Could not find a part of the path 'C:\doesn't exist'. 
        'Dim DirectoryToZip As String = "C:\\doesn't exist\\"
        Using zip As ZipFile = New ZipFile(ZipToCreate)
            Dim filenames As String() = System.IO.Directory.GetFiles(DirectoryToZip)
            Dim filename As String
            For Each filename In filenames
                Console.WriteLine("Adding {0}...", filename)
        End Using

Open in new window

Question by:rwallacej
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
LVL 18

Expert Comment

by:David Robitaille
ID: 22788193
did yu look at that
it use the "fullname" instead of the name

Author Comment

ID: 22790717
thanks for input

is this example for an older version ?


says .BeginUpdate is not a method

Author Comment

ID: 22790814
even a simple example like this isn't working :-(

 Using zip As ZipFile = New ZipFile("")
            zip.AddFile("C:\a folder\test.xml")
        End Using
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

LVL 18

Expert Comment

by:David Robitaille
ID: 22791985
what error did you get? "The given path's format is not supported"?
at witch line exactly?

Author Comment

ID: 22793786
yes this is the error, at line zip.Save()
LVL 18

Accepted Solution

David Robitaille earned 500 total points
ID: 22802763
ok how do you authenticate on the server.
You must make sure than the user that "run" the pages hevr proper rights in the folder you read and in the folder you write.
It could change depending of your config, but must of the times it<s IUSR_ComputerName
Also look ath this: 

Author Closing Comment

ID: 31509254
thanks for help

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question