save file could not find path even after directory creation

Last post 09-30-2010, 3:54 AM by Kenneth. 3 replies.
Sort Posts: Previous Next
  •  09-21-2010, 12:47 PM 64121

    save file could not find path even after directory creation

    Hi guys,
     
    I have dynamically created folders to store a htm file in and it seems the editor does not save the file because it claims it cannot find the path.
     
    I have ran checks with msg boxes to see what it sees and the file path is there and created, but it still does not save the files.
     
    Here is my code:
     
    Dim userFilesString As String = "~\UserFiles\" & Session("UserName").ToString & "\Manuscripts"
    Dim manuscriptPath As String
            Dim chapterPath As String
            Dim versionPath As String
            Dim partialPath As String
     
    manuscriptPath = userFilesString & "\" & manuscriptID.ToString
    chapterPath = "\" & chapterID.ToString
     versionPath = "\" & versionID.ToString & ".htm"
     
    partialPath = ResolveUrl(manuscriptPath & chapterPath)

                    If Not Exists(partialPath) Then
                        CreateDirectory(partialPath)
                    End If
     
                    'this is the test
                    If Exists(partialPath) Then
                        MsgBox(partialPath & " Exists")
                    End If

                    Dim versionFile As String = partialPath & versionPath
                    MsgBox(versionFile)

                    ce_ManuscriptEditor.SaveFile(versionFile)<-- the error occurs here (Could not find a part of the path 'C:\Users\Zephere(JuLian Yong)\Documents\Visual Studio 2008\WebSites\Social Publishing Network\UserFiles\zephere\Manuscripts\3a96632c-e57b-4185-b614-99223b94092d\cbf89742-b0b9-4651-ac8b-24394fa166d6\c75298c8-2ade-4a1e-b608-c0c4936085d7.htm'.)
     
    Someone please help... I have to get this solved urgently
     
  •  09-21-2010, 1:07 PM 64122 in reply to 64121

    Re: save file could not find path even after directory creation

    Dear Zephere,
    What's the value of "versionFile"?  ce_ManuscriptEditor.SaveFile("test.html"), if you hard coded to "test.html",  does it work?  
     
    Thank you for asking
  •  09-21-2010, 1:20 PM 64123 in reply to 64122

    Re: save file could not find path even after directory creation

    Dear Eric,
    If I hardcoded test.html it works...
     
     
    this is the value of version file:
    /Social Publishing Network/manuscripts/7a133cd0-7114-489c-b-60e-3f3f6579082f/37a99426-6a8c-4624-be5e-6a63829e887e\e0582cc6-5d54-46dc-b34d-a1e50461adfe.htm
     
    could the front slash in backslash in bold b the problem?
     
  •  09-30-2010, 3:54 AM 64255 in reply to 64123

    Re: save file could not find path even after directory creation

    Hi Zephere ,
     
    Is your site online? If so, please send the test page url to Kenneth@CuteSoft.net and set up ftp access for me. I will check it and get back to you as soon as possible.
     
    Regards,
     
    Ken 
View as RSS news feed in XML