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