Using Win32 functions in Visual FoxPro Image Gallery
File Management
..msdn
CopyFile
CopyFileTransacted
CreateDirectory
CreateFile
CreateFileTransacted
CreateHardLink
CreateSymbolicLink
DeleteFile
DeleteFileTransacted
FindClose
FindCloseChangeNotification
FindFirstChangeNotification
FindFirstFile
FindNextChangeNotification
FindNextFile
FlushFileBuffers
GetBinaryType
GetCurrentDirectory
GetDriveType
GetFileAttributes
GetFileAttributesEx
GetFileInformationByHandle
GetFileType
GetFullPathName
GetLongPathName
GetShortPathName
GetTempFileName
GetTempPath
LockFile
MoveFile
MoveFileTransacted
OpenFile
QueryDosDevice
ReadDirectoryChangesW
ReadFile
RemoveDirectory
RemoveDirectoryTransacted
ReplaceFile
SearchPath
SetCurrentDirectory
SetEndOfFile
SetFileAttributes
SetFilePointer
SetFilePointerEx
SetSearchPathMode
UnlockFile
WriteFile
_lclose
_lopen
Code examples:
RemoveDirectory
    Add comment     W32 Constants      Translate this page
The RemoveDirectory function deletes an existing empty directory. To recursively delete files and subdirectories in a directory, use the SHFileOperation function.
Code examples:
Declaration:
 
BOOL RemoveDirectory(
  LPCTSTR lpPathName   // directory name
);
 
FoxPro declaration:
 
DECLARE INTEGER RemoveDirectory IN kernel32;
    STRING lpPathName
 
Parameters:
lpPathName
[in] Pointer to a null-terminated string that specifies the path of the directory to be removed. The path must specify an empty directory, and the calling process must have delete access to the directory
Return value:
If the function succeeds, the return value is nonzero
Usage:
 
cPathName = "C:\Temp\aa" 
? RemoveDirectory(cPathName)
 
My comment:
To recursively delete the files in a directory, use the SHFileOperation function.

See also: RemoveDirectoryTransacted
Word Index links for the RemoveDirectory :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-12 12:00:00
Modified: 2010-05-24 12:13:44
Visited in last 7 days: 17
User Contributed Notes:
There are no notes on this subject.


Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (23.22.212.158)
3 sec.Example: 'Winsock: how to retrieve a service information corresponding to a port'
7 sec.Example: 'How to display the Print property sheet'
34.82 min.Function: 'SetKeyboardState'
Function group: 'Keyboard Input'
34.87 min.Example: 'Time in milliseconds represented as string (e.g. 1 hour 24 min 36 sec)'
2.51 hrs.Example: 'Extracting the name and extension parts of a path string'
5.89 hrs.Function: 'GetSysColorBrush'
Function group: 'Brush'
 Example: 'Storing screen shot of a form to bitmap file'
 Example: 'Using IsChild() for testing ThisForm.ShowWindow property'
7.16 hrs.Example: 'How to retrieve information about a cache entry (Internet Explorer)'
 Example: 'How to control Adobe Reader 9.0 (SDI mode) from VFP application'
Google
Advertise here!