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:
Creating a file, then moving it to another destination
MoveFile
    Add comment     W32 Constants      Translate this page
The MoveFile function moves an existing file or a directory, including its children.

To specify how to move the file, use the MoveFileEx function
Code examples:
Creating a file, then moving it to another destination
Declaration:
BOOL MoveFile(
  LPCTSTR lpExistingFileName, // file name
  LPCTSTR lpNewFileName       // new file name
);
FoxPro declaration:
DECLARE INTEGER MoveFile IN kernel32;
    STRING lpExistingFileName,;
    STRING lpNewFileName

Parameters:
lpExistingFileName
[in] Pointer to a null-terminated string that names an existing file or directory

lpNewFileName
[in] Pointer to a null-terminated string that specifies the new name of a file or directory
Return value:
If the function succeeds, the return value is nonzero
My comment:
MSDN: the MoveFile function will move (rename) either a file or a directory (including its children) either in the same directory or across directories.

The one caveat is that the MoveFile function will fail on directory moves when the destination is on a different volume -- use SHFileOperation instead.

See also: CopyFile, DeleteFile, MoveFileTransacted, SHFileOperation
Word Index links for the MoveFile :
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-25 10:56:34
Visited in last 7 days: 21
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 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.6.38), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.196.47.128)
8 sec.Function: 'CeReadFile'
Function group: 'Remote Application Programming (RAPI)'
12 sec.Function: 'OpenProcess'
Function group: 'Process and Thread'
16 sec.Example: 'How to view icons stored in executable files (Icon Viewer) - II'
20 sec.Example: 'How to prevent users from accessing the Windows Desktop and from switching to other applications'
26 sec.Function: 'waveOutGetErrorText'
Function group: 'Windows Multimedia'
29 sec.
Function group: 'Synchronization'
32 sec.Function: 'FtpFindFirstFile'
Function group: 'Internet Functions (WinInet)'
36 sec.Function: 'capGetDriverDescription'
Function group: 'Windows Multimedia'
44 sec.Function: 'FtpGetFile'
47 sec.Banners
Google
Advertise here!