There's a docs module that does it, its basically a client side mod of the file manager. I've seen the creator advertising it in the forums but can't remeber the name.
The other option is to write an importer function. We have a primitive one but it has to be manually installed and run one folder at a time. It beats doing data entry but I think I invested a grand total of 20 minutes building it so use at your own peril.
THIS CODE WILL NOT WORK WITHOUT MODIFICATION AS WE HAVE MADE CORE CHANGES TO OUR DOCUMENTS MODULE
I have this compiling as part of the docs project you will need to remove the terms of use stuff as this is a mod to the docs DB for our version.
DataImporter.Aspx
-------
<%@ Control language="vb" CodeBehind="DocumentImporter.ascx.vb" AutoEventWireup="false" Explicit="True" Inherits="DotNetNuke.Modules.Documents.DocImporter" targetSchema="http://schemas.microsoft.com/intellisense/ie5"%>
<DIV class="DNN_Documents"> </DIV>
<DIV class="DNN_Documents">
<DIV class="DNN_Documents">TermsOfUse:
<asp:TextBox id="txtTermsOfUse" runat="server"></asp:TextBox> 0:None 1:MAR
Forms 2:Local Board Forms</DIV>
<DIV class="DNN_Documents"> </DIV>
<DIV class="DNN_Documents">FolderID:
<asp:DropDownList id="drpfolderid" runat="server" DataValueField="FolderID" DataTextField="FolderPath"></asp:DropDownList></DIV>
<DIV class="DNN_Documents"> </DIV>
<DIV class="DNN_Documents">
<asp:Button id="Button2" runat="server" Text="Button"></asp:Button>
<asp:DataGrid id="DataGrid1" runat="server"></asp:DataGrid></DIV>
</DIV>
--------
DocumentImporter.aspx.vb
-----
'
Imports
DotNetNuke
Imports
System.Web.UI.WebControls
Imports
DotNetNuke.Services.FileSystem
Namespace
DotNetNuke.Modules.Documents''' -----------------------------------------------------------------------------
''' <summary>
''' The Document Class provides the UI for displaying the Documents
''' </summary>
''' <returns></returns>
''' <remarks>
''' </remarks>
''' <history>
''' [cnurse] 9/22/2004 Moved Documents to a separate Project
''' </history>
''' -----------------------------------------------------------------------------
#
#
Public MustInherit Class DocImporterInherits Entities.Modules.PortalModuleBaseImplements Entities.Modules.IActionablePrivate Const NOT_READ As Integer = -2Private mobjSettings As DocumentsSettingsInfoPrivate mobjDocumentList As ArrayListPrivate mintTitleColumnIndex As Integer = NOT_READProtected WithEvents Button1 As System.Web.UI.WebControls.ButtonProtected WithEvents Terms1 As System.Web.UI.WebControls.PanelProtected WithEvents Terms2 As System.Web.UI.WebControls.PanelProtected WithEvents txtTermsOfUse As System.Web.UI.WebControls.TextBoxProtected WithEvents Button2 As System.Web.UI.WebControls.ButtonProtected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGridProtected WithEvents drpfolderid As System.Web.UI.WebControls.DropDownListPrivate mintDownloadLinkColumnIndex As Integer = NOT_READRegion " Controls "End Region
#
Region " Event Handlers "Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.LoadIf Page.IsPostBack = False Then
folderlistreader = DotNetNuke.Data.DataProvider.Instance.ExecuteSQL(mysql)
drpfolderid.DataSource = folderlistreader
drpfolderid.DataBind()
folderlistreader.Close()
Dim mysql As String = "SELECT * From Folders Order By FolderPath"Dim folderlistreader As IDataReaderEnd If
End Sub
#
End Region
#
Region " Optional Interfaces "Public ReadOnly Property ModuleActions() As Entities.Modules.Actions.ModuleActionCollection Implements Entities.Modules.IActionable.ModuleActionsGet
Actions.Add(GetNextActionID, Localization.GetString(Entities.Modules.Actions.ModuleActionType.AddContent, LocalResourceFile), Entities.Modules.Actions.ModuleActionType.AddContent, "", "", EditUrl(),
Dim Actions As New Entities.Modules.Actions.ModuleActionCollectionFalse, Security.SecurityAccessLevel.Edit, True, False)Return ActionsEnd Get
End Property
#
End Region
#
Region " Web Form Designer Generated Code "'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()End Sub
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Init'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
' declare module actions
End Sub
#
End Region
#
Region " Private Methods "Private Sub AddDownloadLink(ByVal Title As String, ByVal Name As String)Dim objTemplateColumn As System.Web.UI.WebControls.TemplateColumnDim strCellPrefix As String
objTemplateColumn =
objTemplateColumn.ItemTemplate =
objTemplateColumn.HeaderText = Title
strCellPrefix = Title
New System.Web.UI.WebControls.TemplateColumnNew DownloadColumnTemplate(Name, Localization.GetString("DownloadLink.Text", LocalResourceFile), ListItemType.Item)If strCellPrefix = String.Empty AndAlso Name = "ctlDownloadLink" Then
strCellPrefix = "Download"
End If
objTemplateColumn.HeaderStyle.CssClass = strCellPrefix & "Header"
'"NormalBold"
objTemplateColumn.ItemStyle.CssClass = strCellPrefix & "Cell"
'"Normal"
End Sub
#
End Region
Response.Write(drpfolderid.SelectedItem.Value)
dbread = DotNetNuke.Data.DataProvider.Instance.ExecuteSQL(mysql2)
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.ClickDim mysql2 As String = "SELECT Files.FileId, Files.PortalId, Files.Extension, Files.FileName, Files.Size, Files.Width, Files.ContentType, Files.Height, Files.Folder, Files.FolderID, Files.[Content], Folders.FolderPath, Folders.PortalID AS Expr1 FROM Files LEFT OUTER JOIN Folders ON Files.FolderID = Folders.FolderID WHERE(Files.FolderID = " & Me.drpfolderid.SelectedValue & ")"Dim dbread As IDataReader
.Category = ""
.CreatedByUser = ""
.CreatedByUserID = 1
.CreatedDate = Now()
.Description = ""
.ModifiedDate = Now()
.ModifiedByUserID = 1
.ModifiedByUser = ""
.ModuleId =
.NewWindow =
Do While dbread.ReadDim DocControl As New DotNetNuke.Modules.Documents.DocumentControllerDim MyDoc As New DotNetNuke.Modules.Documents.DocumentInfoWith MyDocMe.ModuleIdFalse
.Size =
.SortOrderIndex = 0
.TermsOfUse =
.Title =
.Title = Replace(.Title, "_", " ")
.Title = Replace(.Title, ".pdf", "")
.Title = Replace(.Title, ".doc", "")
.TrackClicks =
CType(dbread("Size"), Integer)CType(txtTermsOfUse.Text, Integer)CType(dbread("FileName"), String)True
.Url = "FileID=" &
CType(dbread("FileID"), Integer)End With
DocControl.AddDocument(MyDoc)
Loop
'End If
dbread.Close()
End Sub
End
End Class Namespace
-----