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:
Changing file attributes
SetFileAttributes
..msdn    Add comment     W32 Constants      Translate this page
Sets a file"s attributes.
Code examples:
Changing file attributes
Declaration:
BOOL SetFileAttributes(
  LPCTSTR lpFileName,      // file name
  DWORD dwFileAttributes   // attributes
);
FoxPro declaration:
DECLARE SHORT SetFileAttributes IN kernel32;
    STRING lpFileName,;
    INTEGER dwFileAttributes
Parameters:
lpFileName
[in] Pointer to a string that specifies the name of the file whose attributes are to be set.

dwFileAttributes
[in] Specifies the file attributes to set for the file.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
DOS command ATTRIB can be used for the same purpose:
ATTRIB -R c:\mydir\*.* /S
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-08-14 12:00:00
Modified: 2007-08-02 14:20:04
Visited in last 7 days: 17
User Contributed Notes:
Shailesh Pujara | 2006-08-23 06:24:17
Thanks!
But it may be better if the attribute constants
like
#define READONLY 1
#define HIDDEN 2
#define SYSTEM 4
#define DIRECTORY 16 && folder's attribute
#define ARCHIVE 32

also given.
A.M. | 2007-08-02 18:17:31
List of Win32 constants can be found at
http://www.news2news.com/vfp/w32constants.php

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 (23.20.86.177)
2 sec.Function: 'InternetGetConnectedState'
5 sec.Function: 'CeGetStoreInformation'
8 sec.Function: 'GdiGetBatchLimit'
10 sec.Function: 'NormalizeString'
12 sec.Function: 'EnumPrintProcessors'
15 sec.Function: 'CreateToolhelp32Snapshot'
17 sec.Function: 'DeviceCapabilities'
20 sec.
Function group: 'Mailslot'
23 sec.Function: 'GdipResetWorldTransform'
25 sec.Function: 'FtpGetCurrentDirectory'
Google
Advertise here!