You are viewing limited content. For full access, please sign in.

Question

Question

Create Folder's and Move Files in Bulk

asked on February 15, 2023

We currently are utilizing LaserFiche version 10.2

 

We need to create multiple new folders and move files into those folders. I am trying to figure out how to do this in bulk. After searching through Google, I created a SQL query against the Laserfiche database that pulls the document name, server path, and LaserFiche path.

 

It looks like the LaserFichepath is only pointerd to the raw files on the server. Can I just write a script to update the path of the file on the server to a new virtual path in LaserFiche? Then when users log in they see the files in the new folders instead of manually moving them? 

 

If anyone is curious here is my SQL

 

SELECT toc.tocid                                                                                                                            
    ,      laserfiche8.dbo.toc.name                                                                                                                          AS DocumentName
    ,      edoc_ext                                                                                                                              AS [Extension]
    ,      laserfiche8.dbo.vol.fixpath + '\e' +
    SUBSTRING(CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), laserfiche8.dbo.toc.edoc_storeid),2),1,2) + '\' +
    SUBSTRING(CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), laserfiche8.dbo.toc.edoc_storeid),2),3,2) + '\' +
    SUBSTRING(CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), laserfiche8.dbo.toc.edoc_storeid),2),5,2) + '\' +
    CONVERT(VARCHAR(8),CONVERT(VARBINARY(4), laserfiche8.dbo.toc.edoc_storeid),2) + '.' + laserfiche8.dbo.toc.edoc_ext                                                   AS FullPathAndFilenameServer
    ,      CONCAT(XXX.dbo.GetToPath(toc.tocid),laserfiche8.dbo.toc.name,'.',edoc_ext)                                                     as [LaserFische Path]

     

    FROM      laserfiche8.dbo.toc
    LEFT JOIN laserfiche8.dbo.vol ON laserfiche8.dbo.toc.vol_id = laserfiche8.dbo.vol.vol_id

 

And the output looks like this:

Org ID    DocumentName    Extension    FullPathAndFilenameServer    LaserFische Path
155 2009 5 pt 1    pdf    \\xx\Volumes\\VOLUME-000002\e00\00\00\00000001.pdf    ROOT FOLDER\Accreditation Services\NJ\155\1. Historical\2009 5 pt 1.pdf

 

 

Thank you

 

0 0

Replies

replied on February 15, 2023

Direct modifications of the database are not supported.

It's not clear to me what the end goal is though. Are you trying to move the files on disk? Or are you trying to reorganize the folder structure in the repository?

3 0
replied on February 16, 2023

Hello,

 

I am trying to reorganize the folder structure in an automated way. I am trying to avoid having someone go in and manually move files. There must be a better way. 

0 0
replied on February 16, 2023

Right, but are you talking about the folder structure in the repository or the folder structure on disk?

0 0
replied on February 16, 2023

The folder structure in the repository. How it looks to the client.

0 0
replied on February 17, 2023

Ok, then it doesn't matter where they are on disk. Those locations wouldn't change if you reorganize your repository.

As Ingeborg mentioned, Workflow is probably the best way because you can build rules for documents to be moved and you'd have some tracking of what was moved.

If this is your first encounter with Workflow, you'll likely want to start small and do a couple of test runs first.

0 0
replied on February 15, 2023

If you have workflow, you could build a workflow or business process to move them for you and schedule it in low traffic times.

1 0
replied on February 16, 2023

Is work flow part of LaserFiche or is that another product? 

0 0
replied on February 16, 2023

Yes, Workflow is part of the Laserfiche suite. You may want to contact your Laserfiche Solution Provider to get a better of understanding of what is needed to do what you need.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.