OPENDIR() using a cifs file system mount

Boaz Bezborodko boaz at mirrotek.com
Fri Jun 14 05:36:25 PDT 2019


> Message: 1
> Date: Thu, 13 Jun 2019 17:34:50 -0400
> From: Nancy Palmquist <Nancy.Palmquist at vss3.com>
> To: filePro Mailing List <filepro-list at lists.celestial.com>
> Subject: OPENDIR() using a cifs file system mount
> Message-ID: <e2372286-9ee9-9cfc-a3cc-eb57d2ecc9f6 at vss3.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Fellow Filepro users,
>
> I have run into an issue using a Linux version of filepro 5.0 and we
> store historical data on a cifs mounted device.? FilePro needs to read
> the filenames and move the files to permanent storage based on some
> information.
>
> So generally the files are dropped in a tmp folder, filepro uses
> OPENDIR() to get an array with the file names, we lookup the order and
> then move the file to an archive folder based on the looked up info.
>
> This worked great until the drive failed and we had to replace it.
>
> cifs mount on the Linux side was setup the same.? I added commands to
> the mount to set the owner, group, file modes and directory modes.? I
> setup the drive as Read/Write.? I can export a file into the TMP
> folder.? I can use SYSTEM "ls -l TMPFOLDER" and get a directory listing.
> But aa=opendir("*.xml",TMPFOLDER) returns 0 files (There are a few
> hundred in the folder)
>
> Any ideas?
>
> I expect the NAS device we had to put in place in this emergency is not
> functioning correctly.? It is WINDOWS based and the one that crashed was
> LINUX based.
>
> Is there something else I should be checking before I reprogram the
> logic using another method than OPENDIR()???
>
> Nancy
>

I use to use OPENDIR until I ran into its 32 character limit.  Now I 
regularly use a routine to list the contents of the directory into a 
file and a loop to READLINE the file into an array.  (This is a DOS 
version.)

::DECLARE Command, File_Location, NextLine, Total_Files(4,.0)
GetFil:::
::Command="DIR"<File_Location{"Inbound\*.csv /b > 
H\fpro\temp\XXX_Dir_List.txt":
::SYSTEM Command:
::ar=OPEN("H\\FPRO\\temp\\XXX_Dir_List.txt","rt"):
::CHDIR File_Location:
::Total_Files="0":
LOOP:'Read file information:as=READLINE(ar,NextLine):
:as eq "0":CHDIR "H\fpro" ; RETURN:
::o=Total_Files+"1":
::DownFile(o)=NextLine:
::Total_Files=Total_Files+"1":
::GOTO LOOP:



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus



More information about the Filepro-list mailing list