PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US

  • Multiple directory substitutions
  • Substituting directories
  • Various
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
HSubstDir (Function)
In French: HSubstRep
OLE DBHFSQLAvailable only with these kinds of connection
Associates the data directory specified in the analysis with a directory found on disk. Once HSubstDir has been run, all the data files associated with the directory specified in the analysis will be handled in the indicated directory.
Caution: The data files must be closed beforehand (HClose).
To modify the path of a single data file, use HChangeDir.
Note: In Client/Server mode, use HChangeDir.
Versions 17 and later
iPhone/iPad This function is now available for the iPhone/iPad applications.
New in version 17
iPhone/iPad This function is now available for the iPhone/iPad applications.
iPhone/iPad This function is now available for the iPhone/iPad applications.
Versions 18 and later
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
New in version 18
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
Universal Windows 10 App This function is now available in Windows Store apps mode.
Android Widget This function is now available in Android Widget mode.
Android This function is now available for the Android applications (for the HFSQL data files).
WINDEVJava This function is now available for the Java applications.
Note: From version 19, HFSQL is the new name of HyperFileSQL.
Versions 21 and later
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
New in version 21
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
Universal Windows 10 App This function is now available in Universal Windows 10 App mode.
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)HFSQLHyper File 5.5OLE DB
// Change the directory for the files defined in
// a specific directory in the analysis
HSubstDir("C:\File", "D:\File")
// Open/Create the files in the new directory
HCreationIfNotFound("*")
WINDEVWEBDEV - Server codeReports and QueriesAjaxUser code (UMC)HFSQL
IF HSubstDir(".","C:\ACCOUNTING\YEAR2012") = True THEN
Info("You are going to work on the files found in the directory: C:\ACCOUNTING\YEAR2012")
ELSE
Error(HError)
END
Windows Mobile
// Change the directory for the files defined in
// a specific directory in the analysis
HSubstDir("\FileA", "\FileB")
// Open/Create the files in the new directory
HCreationIfNotFound("*")
Syntax
<Result> = HSubstDir(<Directory of Files Specified in Analysis> , <Physical Directory of Files on Disk>)
<Result>: Boolean
This parameter is always equal to True. If an error occurs, the next function for accessing the data file will return False. For example, if the specified physical directory does not exist, a directory error will occur during the first access to the data file.
<Directory of Files Specified in Analysis>: Character string with quotes
Name of the directory specified during the description of the data file.
WINDEVWEBDEV - Server code If this parameter is equal to "?" or to ".", the current directory of the application is taken into account (directory returned by fCurrentDir).
<Physical Directory of Files on Disk>: Character string with quotes
New name of the directory (up to 260 characters). A UNC path can be used.
HSubstDir is ignored if the specified directory contains data files in a format other than HFSQL.
WINDEVWEBDEV - Server code If this parameter corresponds to:
  • an empty string (""): the substitution is canceled: the data directory described in the analysis is taken into account.
  • "?" or ".": the physical data directory corresponds to the current directory.
Remarks

Multiple directory substitutions

HSubstDir can be called several times with different parameters. When the physical directory is redefined several times for the same logical directory (described in the analysis), the last specified physical directory replaces all the other ones.

Substituting directories

HChangeDir is used to associate a directory with a data file. To substitute a directory for another one, use HSubstDir.
Caution: the change of directory performed by HSubstDir applies to the directory defined by HChangeDir. For example:
HSubstDir("C:\Statistics\January", "C:\New\JanStats")
HChangeDir(Stat, "C:\Statistics\January")
HCréation(Stat) //File created in C:\New\JanStats

Various

  • If the management of ".REP" is enabled (HSetREP), the modification of the path is saved in the ".REP" file (see management of .REP).
  • The new path is stored when the data file is closed.
  • This function cannot be used during a remote access. See RPC on HFSQL (Remote access) for more details.
  • The number of substitutions is unlimited.
Components
WINDEVWEBDEV - Server codeReports and Queries wd230hf.dll
Windows Mobile wp230hf.dll
Java wd230java.jar
Linux wd230hf.so
Android wd230android.jar
Minimum required version
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment