Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

Delete Files with Read Only attributes


3 replies to this topic

rahuld

rahuld
  • Members
  • 15 posts

Posted 02 May 2005 - 15:15

Hi,

How can I delete read only files from a folder.

Please suggest.

Thanks,
Rahul

Silverlay

Silverlay
  • Members
  • 68 posts

Posted 03 May 2005 - 07:47

You can delete them usin something like this ...

CODE

OpenFileMode(FILE_MODE_APPEND);
hResult = CreateFile(hFile, SUPPORTDIR, "remove.bat");
svFile = "MyFilePath.txt";
hResult = WriteLine( hFile, "del " + svFile );                              
CloseFile ( hFile );

hResult = LaunchAppAndWait ( svEXE, "", LAAW_OPTION_WAIT | LAAW_OPTION_HIDDEN | LAAW_OPTION_MINIMIZED );

Bonum initium est dimidium facti

rahuld

rahuld
  • Members
  • 15 posts

Posted 03 May 2005 - 18:11

Thanks for your suggestion.

-- Rahul

Silverlay

Silverlay
  • Members
  • 68 posts

Posted 03 May 2005 - 18:13

Don't mention it
Bonum initium est dimidium facti