Skip to content

Latest commit

 

History

History
56 lines (38 loc) · 1.37 KB

FtpSetCurrentDirectory.md

File metadata and controls

56 lines (38 loc) · 1.37 KB

Home

Function name : FtpSetCurrentDirectory

Group: Internet Functions (WinInet) - Library: wininet


Changes to a different working directory on the FTP server


Code examples:

Retrieving list of files on the FTP directory
Downloading files from the FTP server using InternetReadFile
Reading list of folders and files on FTP server
Custom FTP Class for Visual FoxPro application

Declaration:

BOOL FtpSetCurrentDirectory(
    HINTERNET hConnect,
    LPCTSTR lpszDirectory
);
  

FoxPro declaration:

DECLARE INTEGER FtpSetCurrentDirectory IN wininet;
	INTEGER   hFtpSession,;
	STRING  @ lpszDirectory  

Parameters:

hConnect [in] Valid HINTERNET handle to an FTP session.

lpszDirectory [in] Pointer to a null-terminated string that contains the name of the directory to change to on the remote system


Return value:

Returns TRUE if successful, or FALSE otherwise


Comments:

The function is very straightforward, nothing sophisticated. You can pass the directory name by a reference or by a value; it looks like the VFP automatically changes the passing value to a proper format