You can use the SQL script provided in Locating File in Laserfiche based on File Path in Volume
Or here is a slightly easier query to get docid from volume file. Just edit the first 3 SET values and then execute.
DECLARE @IsImage bit,
@FileName varchar(10),
@VolName nvarchar(63)
-- Edit the below 3 SET values
-- @IsImage Options
-- 0 = No(Electronic Document), 1 = Yes(TIFF Image)
SET @IsImage = 0
-- copy the whole file name without extention
SET @FileName = '0000029B'
-- Copy the folder name of the folder that contains the 00 and e00 folders
Set @VolName = N'DEFAULT000001'
-- Do Not Edit Below This Point
DECLARE @iFileName int,
@hexstr nvarchar(10),
@hex char(1),
@i int,
@place bigint,
@a bigint
-- Get integer value from File Name
SET @hexstr = '0x' + @FileName
SET @i = LEN(@hexstr)
SET @place = CONVERT(bigint,1)
SET @a = CONVERT(bigint, 0)
WHILE (@i > 0 AND (SUBSTRING(@hexstr, @i, 1) like '[0-9A-Fa-f]'))
BEGIN
SET @hex = SUBSTRING(@hexstr, @i, 1)
SET @a = @a +
CONVERT(bigint, CASE WHEN @hex LIKE '[0-9]'
THEN CAST(@hex as int)
ELSE CAST(ASCII(UPPER(@hex))-55 AS int) END * @place)
SET @place = @place * CONVERT(bigint,16)
SET @i = @i - 1
END
SET @iFileName = CONVERT(int, @a)
If (@IsImage = 1)
BEGIN
SELECT [dbo].[doc].[tocid] AS [EntryID]
FROM [dbo].[doc]
INNER JOIN [dbo].[toc]
ON [dbo].[doc].[tocid] = [dbo].[toc].[tocid]
INNER JOIN [dbo].[vol]
ON [dbo].[toc].[vol_id] = [dbo].[vol].[vol_id]
WHERE [dbo].[vol].[vol_name] = @VolName AND [dbo].[doc].[storeid] = @iFileName
End
Else
Begin
SELECT [dbo].[toc].[tocid] AS [EntryID]
FROM [dbo].[toc]
INNER JOIN [dbo].[vol]
ON [dbo].[toc].[vol_id] = [dbo].[vol].[vol_id]
WHERE [dbo].[toc].[edoc_storeid] = @iFileName AND [dbo].[vol].[vol_name] = @VolName
End