PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Selecting files
  • Limitations
  • Operating mode in Java
  • Former and new directory picker
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Opens a directory picker.
The directory picker is as follows (the appearance of picker may change according to the system used)
Directory picker
Directory picker
Note: You have the ability to select a local directory or a directory found on a network disk.
Versions 16 and later
WINDEVLinux This function is now available for the WINDEV applications in Linux.
New in version 16
WINDEVLinux This function is now available for the WINDEV applications in Linux.
WINDEVLinux This function is now available for the WINDEV applications in Linux.
// Select a directory
Directory = fSelectDir("C:\Directories", "Select a directory", ...
"Select the directory that will be copied")
Syntax
<Result> = fSelectDir(<Directory Selected by Default> , <Picker Title> [, <Picker Comments> [, <Root Directory> [, <Options>]]])
<Result>: Character string
  • Path and full name of selected directory,
  • Empty string ("") if no directory was selected. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Directory Selected by Default>: Character string (with quotes)
Name and full (or relative) path of directory selected by default. A UNC path can be used. This parameter must end with "\". If this parameter is an empty string (""), no directory will be selected by default.
Versions 15 and later
Windows This parameter can be in Ansi or Unicode format.
New in version 15
Windows This parameter can be in Ansi or Unicode format.
Windows This parameter can be in Ansi or Unicode format.
<Picker Title>: Character string (with quotes)
Caption displayed in the title bar of directory picker.
If this parameter is an empty string (""), the "Find a folder" title will be displayed.
Versions 15 and later
Windows This parameter can be in Ansi or Unicode format.
New in version 15
Windows This parameter can be in Ansi or Unicode format.
Windows This parameter can be in Ansi or Unicode format.
<Picker Comments>: Optional character string (with quotes)
Comments displayed at the top of directory picker.
Versions 15 and later
Windows This parameter can be in Ansi or Unicode format.
New in version 15
Windows This parameter can be in Ansi or Unicode format.
Windows This parameter can be in Ansi or Unicode format.
<Root Directory>: Optional character string (with quotes)
Name and full path of "root" directory in the proposed tree structure. A UNC path can be used. If this parameter is an empty string (""), the "Desktop" directory will start the proposed tree structure.
This parameter is used to limit the selection to the directories of a given disk or to the sub-directories of a given directory.
Versions 15 and later
Windows This parameter can be in Ansi or Unicode format.
New in version 15
Windows This parameter can be in Ansi or Unicode format.
Windows This parameter can be in Ansi or Unicode format.
Versions 23 and later
If this parameter differs from empty string (""), the former directory picker will be used.
New in version 23
If this parameter differs from empty string (""), the former directory picker will be used.
If this parameter differs from empty string (""), the former directory picker will be used.
<Options>: Optional Integer constant
Versions 15 and later
Allows you to specify:
  • the format of function result. By default, fSelectDir returns a character string in Ansi format.
  • Versions 23 and later
    the style of directory picker.
    New in version 23
    the style of directory picker.
    the style of directory picker.
fPathUNICODE<Result> will be a character string in Unicode format.
Versions 16 and later
Linux This constant is not available.
New in version 16
Linux This constant is not available.
Linux This constant is not available.
Versions 23 and later
fdFormerAspect
New in version 23
fdFormerAspect
fdFormerAspect
Allows you to use the former directory picker (old style).
Directory picker
LinuxJava This constant is not available.
Versions 18 and later
fdForbidVirtualFolder
New in version 18
fdForbidVirtualFolder
fdForbidVirtualFolder
<Result> will not contain the virtual directories.
LinuxJava This constant is not available.
New in version 15
Allows you to specify:
  • the format of function result. By default, fSelectDir returns a character string in Ansi format.
  • Versions 23 and later
    the style of directory picker.
    New in version 23
    the style of directory picker.
    the style of directory picker.
fPathUNICODE<Result> will be a character string in Unicode format.
Versions 16 and later
Linux This constant is not available.
New in version 16
Linux This constant is not available.
Linux This constant is not available.
Versions 23 and later
fdFormerAspect
New in version 23
fdFormerAspect
fdFormerAspect
Allows you to use the former directory picker (old style).
Directory picker
LinuxJava This constant is not available.
Versions 18 and later
fdForbidVirtualFolder
New in version 18
fdForbidVirtualFolder
fdForbidVirtualFolder
<Result> will not contain the virtual directories.
LinuxJava This constant is not available.
Allows you to specify:
  • the format of function result. By default, fSelectDir returns a character string in Ansi format.
  • Versions 23 and later
    the style of directory picker.
    New in version 23
    the style of directory picker.
    the style of directory picker.
fPathUNICODE<Result> will be a character string in Unicode format.
Versions 16 and later
Linux This constant is not available.
New in version 16
Linux This constant is not available.
Linux This constant is not available.
Versions 23 and later
fdFormerAspect
New in version 23
fdFormerAspect
fdFormerAspect
Allows you to use the former directory picker (old style).
Directory picker
LinuxJava This constant is not available.
Versions 18 and later
fdForbidVirtualFolder
New in version 18
fdForbidVirtualFolder
fdForbidVirtualFolder
<Result> will not contain the virtual directories.
LinuxJava This constant is not available.
Remarks

Selecting files

fSelectDir is used to to select a directory. To select a file, use fSelect.

Limitations

This function can be used only if the version 4.00 of SHELL32.DLL is available on the system. If this library is not found, a non-fatal WLanguage error will be generated by fSelectDir.
Java

Operating mode in Java

In Java, in Windows, the use of fSelectDir displays a Java window that simulates the aspect and the operating mode of Windows directory picker.
To force the use of Java directory picker, you must use <wd.prop.sel_rep_defaut> when starting the application and you must specify one of the following values: oui/o/yes/y/vrai/true.
Example of command line used to start a Java application by forcing the use of Java directory picker:
java -Dwd.prop.sel_rep_defaut=y -jar MyApplication.jar

In Java, in the other OS (Linux, Mac, ...), the use of fSelectDir displays the Java directory picker.
To force the display of a Java window that simulates the aspect and the operating mode of native Windows directory picker, you must use <wd.prop.sel_rep_windows> when starting the application and you must specify one of the following values: oui/o/yes/y/vrai/true.
Example of command line used to start a Java application by forcing the use of Windows directory picker:
java -Dwd.prop.sel_rep_windows=y -jar MyApplication.jar
Versions 23 and later
WINDEV

Former and new directory picker

From version 23, the new directory picker is used by default.
If the new picker is not supported (the new picker is supported from Windows Vista) or if the <Root> parameter is not empty (the root directory is not supported by the new picker), the former picker is displayed even if the frFormerAspect constant is not specified.
New in version 23
WINDEV

Former and new directory picker

From version 23, the new directory picker is used by default.
If the new picker is not supported (the new picker is supported from Windows Vista) or if the <Root> parameter is not empty (the root directory is not supported by the new picker), the former picker is displayed even if the frFormerAspect constant is not specified.
WINDEV

Former and new directory picker

From version 23, the new directory picker is used by default.
If the new picker is not supported (the new picker is supported from Windows Vista) or if the <Root> parameter is not empty (the root directory is not supported by the new picker), the former picker is displayed even if the frFormerAspect constant is not specified.
Components
WINDEVReports and Queries wd230std.dll
Java wd230java.jar
Linux wd230std.so
Minimum required version
  • Version 9
This page is also available for…
Comments
EXEMPLO
https://youtu.be/zppJSG0zV6o

http://windevdesenvolvimento.blogspot.com/2018/04/dicas-1739-publica-windev-acbr-69-acbr.html

https://groups.google.com/d/forum/amarildowindev

// EXEMPLO


sDirectory is string

sDirectory = fSelectDir("", "")

EDT_DIRETORIO=sDirectory+"\"

// C:\AMARILDO\

De matos
May 29 2018
Exemplo de Mostrar Arquivos de Um Diretorio
//lista arquivos
TableDeleteAll(TABLE_lista_arquivos)
s_arquivos_todos is string=fListFile(SAI_DIRETORIO+"*.*")
s_arquivo_individual is string=""
FOR EACH STRING s_arquivo_individual OF s_arquivos_todos SEPARATED BY CR
s_nome_arquivo is string=fExtractPath(s_arquivo_individual,fFileName+fExtension)
s_tamanho_arquivo is string=fSize(SAI_DIRETORIO+s_nome_arquivo)
dS_data_arquivo is Date=fDate(SAI_DIRETORIO+s_nome_arquivo)
hS_hora_arquivo is Time=fTime(SAI_DIRETORIO+s_nome_arquivo) TableAddLine(TABLE_lista_arquivos,s_nome_arquivo,s_tamanho_arquivo,dS_data_arquivo,hS_hora_arquivo)
END
TableSort(TABLE_lista_arquivos,"-TABLE_lista_arquivos.COL_Data","-TABLE_lista_arquivos.COL_Hora")

//pesquisa diretorio
sRépertoire_ is string
sRépertoire_ = fSelectDir("", "")
SAI_DIRETORIO=sRépertoire_
//Blog com video e Exemplo
http://windevdesenvolvimento.blogspot.com.br/2016/02/curso-windev-arquivos-001-listar.html
De matos AMARILDO
Feb. 09 2016