Solved

file management powerbuilder

Posted on 2011-09-07
6
455 Views
Last Modified: 2013-12-26
using FindFirstFileW we can search files  but how to search  file contains a word using  powerbuilder  .. any body having idea ?
0
Comment
Question by:digitecherp
6 Comments
 
LVL 1

Accepted Solution

by:
carcarah earned 500 total points
ID: 36999524
First of all, we have to establish one thing here: Any function (internal or your function -- doesn't matter which) always have to load the list of files and read the name of each one.
So, I advise you to create a function working with a listbox to load the whole directory list and use the Pos ( string1, string2 {, start } ) to find the string.

String ls_filespec, ls_nm
Integer li_total, li_counter

ls_filespec = "*.*"
lb_files.DirList(ls_filespec, 0)
li_total = lb_files.totalitems()
FOR li_counter = 1 to li_total
      ls_nm = Mid(lb_arquivos.text(li_counter , 2, 3)
        if Pos ( ls_nm, "word you want") <> 0 then       ddlb_match.AddItem(ls_nm)
NEXT
0
 

Author Closing Comment

by:digitecherp
ID: 37505542
ok
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question