Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
File moving
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01321516
Message ID:
01321733
Views:
17
#DEFINE CREATE_ALWAYS 2
#DEFINE FILE_ATTRIBUTE_NORMAL 128

DO declare

lpFileName = "C:\Temp\mytest.txt"
lpNewFileName = "C:\Temp\mytest1.txt"

hFile = CreateFile(lpFileName, 0, 0, 0,;
	CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)

? "File handle returned:", hFile
= CloseHandle (hFile)
= MoveFile(lpFileName, lpNewFileName)

PROCEDURE declare
	DECLARE INTEGER MoveFile IN kernel32;
		STRING lpExistingFileName, STRING lpNewFileName

	DECLARE INTEGER CreateFile IN kernel32;
		STRING lpFileName, INTEGER dwDesiredAccess,;
		INTEGER dwShareMode, INTEGER lpSecurityAttributes,;
		INTEGER dwCreationDisposition,;
		INTEGER dwFlagsAndAttributes, INTEGER hTemplateFile

	DECLARE INTEGER CloseHandle IN kernel32 INTEGER hObject
Previous
Reply
Map
View

Click here to load this message in the networking platform