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:
Using the CopyFile
Using the CopyFile

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
Before you begin:
See also:
  • Copying files as a transacted operation
  • Displaying standard progress dialog box when copying files
  • Deleting file into the Recycle Bin

  • DECLARE INTEGER CopyFile IN kernel32;
        STRING lpExistingFileName,;
        STRING lpNewFileName,;
        INTEGER bFailIfExists
    
    ? CopyFile("C:\Autoexec.bat", "C:\Autoexec.cpy", 0)
    
    
    

    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    175 bytes  
    Created: 2001-07-12 12:00:00  
    Modified: 2010-07-30 08:31:37  
    Visits in 7 days: 44  
    Listed functions:
    CopyFile
    Printer friendly API declarations
    Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    priya@datalinks-india.com | 2005-05-20 13:05:12
    Generally, In our codes while using scatter memvar kind of commands, in some cases accidently, if a database file is not opened prior to that, the file open dialog pops up. Just want to know, if there is any flag which we can access as programmers to know that the open dialog is about to pop up, since in windows environment the users may accidently delete the files by pointing on to it.

    Kindly advise, Thank you.
    David Le Mesurier | 2006-06-20 07:57:49
    Is there a way to copy a whole directory and all it's children?
    A.M. | 2006-06-20 09:41:09
    Hi David,

    Take a look at "My Comment" section for example=508 -- there's Windows Scripting code doing exactly what you've asked. Otherwise use SHFileOperation function.

    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.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (54.80.140.5)
    10 sec.Function: 'CreateNamedPipe'
    22 sec.Example: 'How to convert a bitmap file to monochrome format (1 bpp)'
    33 sec.
    Function group: 'Clipboard'
    45 sec.Function: 'GetProcessVersion'
    Function group: 'Process and Thread'
    57 sec.
    Function group: 'Remote Application Programming (RAPI)'
    1.15 min.Function: 'GetFileType'
    Function group: 'File Management'
    1.38 min.
    Function group: 'Time'
    1.62 min.Function: 'GetWindowThreadProcessId'
    Function group: 'Window'
    1.83 min.
    Function group: 'Error Handling'
    2.07 min.
    Function group: 'Pipe'
    Google
    Advertise here!