I found this code but I found out that it only gets up to 35 filenames. Selecting more than that results to only one record with a corrupted square character. I need to be able to select at least 1000 files.
- gryff15 -
Code:
WITH THISFORM._COMDLG1
.ClearFilters() && Clear filters in case in loop
.lAllowMultiSelect = .T. && Enable multiple file selection
.cFileName = [] && Do not set an initial file name
.cInitialDirectory = [C:\My Documents] && Start folder
.cTitlebarText = [Select multiple files] && Dialog titlebar text
.aFilterList[1,1] = [Image Files (bmp,gif,jpg)] && First half of filter list
.aFilterList[1,2] = [*.bmp;*.gif;*.jpg;*.jpeg] && Second half of filter list
* Should you want additional filters you can add them with :-
.AddFilter([MS Office (doc,ppt,rtf,txt,wri,xls)],[*.doc;*.ppt;*.rtf;*.txt;*.wri;*.xls;*.csv])
.nFileCount = 0 && Reset file count value in case dialog in DO WHILE... loop
.ShowDialog() && Show dialog
IF .nFileCount > 0 && File(s) selected
FOR i = 1 TO ALEN(.aFileNames,1) && Loop through array created
INSERT INTO FILENAMES (filename) VALUES ( ;
ADDBS(.cFilepath) ;
+ LOWER(.aFileNames[1,i])) && Insert path\filename.ext in cursor
ENDF
BROW LAST
ELSE
MESSAGEBOX([You have not made a selection],16,[No files],2000)
ENDI
ENDW
- gryff15 -