Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't get SetFileAttribute to work on one FPT file
Message
From
23/05/1999 07:28:29
 
 
To
23/05/1999 00:17:21
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00221831
Message ID:
00221865
Views:
15
>I tried to change the file attribute of several 6 files with
>a call to the Windows API function below, and it works with
>5 of the files but not with one FPT file. Should I set the bit
>manually to 0 on that file instead?
>
>DECLARE INTEGER SetFileAttribute IN WIN32API STRING, INTEGER
>SetFileAttributes(FULLPATH(FileName), 32)
>

You might consider looking at the return code from the API call, which tells you if it fails or not, and if it does, you can then call GetLastError() to find out why.

>Source Safe is making the files read-only (as it should)
>I'm using the Steven Black's INTL tookit and the files I need to
>change its attributes programatically are:
>(INTL Toolkit crashes if the files are R/O)
>
>strings.dbf
>strings.fpt
>strings.cdx
>
>msgsvc.dbf
>msgsvc.fpt --> doesn't work, Win API call doesn't change file attrib from read only to not.
>msgsvc.cdx
>
>it works with the other 5 files, why ?
>(both strings, and msgsvc have memo fields with text in them)
>If I change attributes from Windows Explorer (with file properties) I can do it.
>If I change attributes from DOS it works too.
>So the file is not corrupt.
>
>thanks
>
>Andres Martinez
>andres@brokersys.com
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform