Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

read file folders and report missing documents???

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    read file folders and report missing documents???

    is this possible?

    we have thousands of client files (folders) which hold all of the documents for each client.

    these documents in the main have the same name - an exampe 'rptRoS'. it is our regulators requirements that we hold these documents.

    So - is it possible to create an app which can read the contents of folders and report those folders which do not have the correct files?

    i have with help, a function to open a file for a specific record and show the contents, but i am thinking here of something which will read each folder in turn and create a record for those folders which have missing docs and name the missing docs.

    the client that these files pertain to are not in my alpha database as they are much older.

    thanks for any ideas.

    richard

    #2
    Re: read file folders and report missing documents???

    is it possible to create an app which can read the contents of folders and report those folders which do not have the correct files
    It is possible to read the contents of folders and the files they contain. Where would the corresponding list of files they should contain be found?
    There can be only one.

    Comment


      #3
      Re: read file folders and report missing documents???

      i thought i could either -

      1. create a master folder with one of each of the documents required

      or

      2. create a table in the db to list the document names

      there are only about 10 compulsary documents

      some could have varying names as time has gone by and systems change, so for example the same doc could be called either

      rptRoS
      RWL
      Comp Ros

      Comment


        #4
        Re: read file folders and report missing documents???

        I have used this in a web grid with a custom field to onlt allow users to progress a job if the PDF proof is present on our Samba file server, or show a note that the proof is missing.

        But the principle is the same, you just have to do a few tests for variants of file names, to allow for the different permutations...

        Code:
        If file.exists("\\PATH_TO_FILE_DIRETORY\\"+FileName) Then
        FileResult = "FILE OK"
        Else
        FileResult = "MISSING"
        End If
        Instead of just returning a string, you could use the list processing functions to collect a list of files present and missing for each entry in a table and so forth.

        Comment


          #5
          Re: read file folders and report missing documents???

          My attchment illustrates one solution. It should be extracted to the root c:\drive as the directory "dirtest". It should contain the database and four sub-directories.

          The script will

          identify the sub directories and check their contents against a list that is built into the script (this list could be generated elsewhere as you mention). As each directory is checked, files that are in each directory are checked against the list. If there are missing files, an entry is made to the issues table recording the directory and the missing files.

          Code:
          alist = <<%lst%
          a123.txt
          b234.txt
          c345.txt
          d456.txt
          e567.txt
          %lst%
          dirs = filefind.get("c:\dirtest\*.*",FILE_FIND_DIRECTORY,"PN")
          dirs = *LINE_REMOVE( dirs,1, 2 )
          cnt = w_count(dirs,crlf())
          FOR i = 1 to cnt
          	files = filefind.get(word(dirs,i,crlf())+"\*.*",FILE_FIND_NORMAL,"N")
          	files = *LINE_REMOVE( files,1, 2 )
          	not_there = WORD_SUBTRACT( alist,files, crlf() )
          	IF not_there >""
          		tbl = table.open("issues",FILE_RW_EXCLUSIVE)
          		tbl.enter_begin()
          		tbl.Directory = word(dirs,i,crlf())
          		tbl.Missing = stritran(not_there,crlf(),", ")
          		tbl.enter_end()
          		tbl.close()
          	END IF
          	
          next i
          end
          Last edited by Stan Mathews; 05-15-2008, 11:51 AM. Reason: added attachment
          There can be only one.

          Comment


            #6
            Re: read file folders and report missing documents???

            stan,

            thanks for this. there is no attachment.

            reading your code i understand most of it. your lines of a123.txt am i right in thinking this is where i would note the names of the documents to be checked against?

            thanks

            richard

            Comment


              #7
              Re: read file folders and report missing documents???

              I added the attachment to the prior post.

              The section

              Code:
              alist = <<%lst%
              a123.txt
              b234.txt
              c345.txt
              d456.txt
              e567.txt
              %lst%
              creates a list of files to be the "standard" content that should be in each folder.
              There can be only one.

              Comment


                #8
                Re: read file folders and report missing documents???

                Stan,

                Thats great. i have modified a little and have got the parent folder to be variable.

                i have tried to make the documents variable. i have limited the search to 5 documents at the moment.

                im struggling with the code.

                open frmbranch to start the search
                the script 'check dirs' is the modified code to make the documents variable.

                any guidance would be appreciated.

                Comment


                  #9
                  Re: read file folders and report missing documents???

                  I think I covered everything and I added a time field to the issues table to be populated when the record is written. I did not change the browse to display it.

                  PS The doc# variables had to be declared as global on the form and in the script for them to be available to the script.
                  There can be only one.

                  Comment


                    #10
                    Re: read file folders and report missing documents???

                    stan thats awesome.

                    we have a big financial services authority visit soon and this will really help us ensure our files are in order.

                    ill put this on the samples page for others.

                    im keen to understand coding better.

                    tst = doc1+doc2+doc3+doc4+doc5
                    if tst = ""
                    ui_msg_box("Oops","No files selected.")
                    end
                    end if

                    alist = *concat_lines(doc1,doc2,doc3,doc4,doc5)
                    how does the concat line work with the tst line. to me it looks like the tst line would concantenate all 5 documents.

                    thanks again.

                    Comment


                      #11
                      Re: read file folders and report missing documents???

                      The *concat_lines() is completely separate logic from the tst variable. The tst variable concatenates all five trimmed values to see if anything has been entered, stopping if it hasn't.

                      *concat_lines() concatenates all five trimmed variables, adds a crlf() after each, and removes any blank lines. This creates the alist variable used in the comparison to the folder contents.
                      There can be only one.

                      Comment


                        #12
                        Re: read file folders and report missing documents???

                        Enhanced to read five "default" documents stored in a new table. Once loaded into the form variables they can be edited on the form. Would be simple to allow user to edit the actual stored values on another form.
                        There can be only one.

                        Comment


                          #13
                          Re: read file folders and report missing documents???

                          this was my next move, thanks. i was also thinking about automatically adding the file extension, the user can type in the document name then choose the doc type from a drop down list, which will add the file extension

                          i used this app on friday and it is such a powerful little tool. it completed a task that would have no doubt taken a human hundreds of hours.

                          thanks again for your time stan.

                          Comment

                          Working...
                          X