Hello Experts,
I have the below configuration:
OS - Win 7
PB Version - 7
I have a list box in a window which I am trying to populate using the DirList function.
I have the below code in the open event of the window:
ls_commandline = message.stringparm
this.is_dir = ls_commandline
I have the below code in the postopen() event of the window:
If GetFileOpenName("Select any PBL", is_dir, ls_junk, "PBL", "PBL Files (*.PBL),*.PBL") = 1 then
is_dir = left(is_dir, len(is_dir) - len(ls_junk))
else
close(this)
return
end if
end if
if len(is_dir) > 0 then
if right(is_dir, 1) <> "\" then
is_dir = is_dir + "\"
end if
lb_1.DirList(is_dir + "*.pbl", 0)
end if
So, the user can either select the directory through the File Open Dialog or can pass the same through the command line arguments in which case the is_dir would be already populated when it comes to this event.
Now, when i run the exe by double-clicking, the FileOpen Dialog opens and when i select any directory, the DirLIst populates the List Box with all the pbls in that directory.
But when i run the same through command prompt and pass the directory via command line arguments, DirList function is not working and it returns FALSE. I am calling the exe like this:
call C:\Users\samiagra\Desktop\pbdups.exe s:\buildsource
The same thing is working fine in Windows XP.
I also tried using the combination of FindFirstFileA and FindNextFileA API functions to populate the List Box but that didn't work either form command prompt.
Please let me know if you have face this kind of issue and is there any solution.
Thanks,
Samir