PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Space character
  • Modifying the current disk and directory
  • Current directory during the tests
  • SOAP server
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
Identifies or modifies the current directory.
// Find out the current directory
ResCurrentDir = fCurrentDir()
Syntax

Finding out the current directory on the specified disk Hide the details

<Result> = fCurrentDir([<Disk> [, <Option>]])
<Result>: Character string
  • Path of current directory on the specified disk (up to 260 characters). This path ends with a "\" character at the root of a disk only ("A:\" for example).


  • -1 if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Disk>: Optional character string (with quotes)
Name of disk where the current directory will be sought. This name has the following format:
  • <drive letter>:. For example: "A:".
  • UNC path. For example: "\\<ServerName>\<ShareName>".
If this parameter is not specified, the disk corresponds to the current disk.
<Option>: Optional Integer constant
Versions 15 and later
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

New in version 15
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

Modifying the current directory Hide the details

<Result> = fCurrentDir(<Path of new current directory> [, <Option>])
<Result>: Character string
  • Path of current directory (up to 260 characters). This path ends with a "\" character at the root of a disk only ("A:\" for example).
  • -1 if an error occurred. To find out the error details, use ErrorInfo associated with the errMessage constant.
<Path of new current directory>: Character string (with quotes)
Full (or relative) path of new current directory (up to 260 characters). A UNC path can be used: it must have the following format: "\\<ServerName>\<ShareName>\<DirectoryName>".
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.
<Option>: Optional Integer constant
Versions 15 and later
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

New in version 15
Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

Used to specify the format of function result. By default, fCurrentDir returns a character string in Ansi format.
fPathUNICODE<Result> will be a character string in Unicode format.

Remarks

Space character

The space characters found on the right of <Path of new current directory> are automatically deleted by fCurrentDir:
fCurrentDir("C:\MyDirectory\    ")
is equivalent to:
fCurrentDir("C:\MyDirectory")

Modifying the current disk and directory

To change the disk, we recommend that you use:
  1. fCurrentDrive to modify the current disk,
  2. fCurrentDir to modify the current directory on the new disk.
If the disk requested by fCurrentDir does not correspond to the current disk, the change of disk is automatically performed.

Current directory during the tests

When running tests from the WINDEV editor (window or project GO), the current directory corresponds to:
Reports and Queries

SOAP server

fCurrentDir used on a SOAP server returns the current directory of the Internet server used. This directory must not be modified.
Related Examples:
Handling text files Unit examples (WINDEV): Handling text files
[ + ] Handling "text" files with WINDEV:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WEBDEV): Handling text files
[ + ] This example explains how to handle "non HFSQL" files with WEBDEV and it allows you to:
- Create a text file
- Write into a text file
- Read in a text file
Handling text files Unit examples (WINDEV Mobile): Handling text files
[ + ] Handling external "text" files:
- Create a text file
- Write into a text file
- Read in a text file
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Example Synchronizes TIME with SERVER TIME
//SINCRONIZA HORARIO COM A HORA DO SERVIDOR

PathFile is string = fCurrentDir ( fCurrentDrive() ) +"\config.ini"

IF CBOX_Sincronizar..Value = True THEN
Sincronizar = "S"
ok is boolean = INIWrite("Nagyro", "Sincronizar", Sincronizar , PathFile)
IF ErrorOccurred = True AND Sincronizar = "" THEN
Error()
END
ELSE
Sincronizar = "N"
ok is boolean = INIWrite("Nagyro", "Sincronizar", Sincronizar , PathFile)
IF ErrorOccurred = True AND Sincronizar = "" THEN
Error()
END
END

IF Sincronizar = "S" THEN
ExeRun("NET TIME \\192.168.1.180 /SET /YES",exeIconize,exeDontWait)
END
adrianoboller
24 Feb. 2015