Delete a File 
Author Message
 Delete a File

Quote:

> Subject:        Delete a File
> Date sent:      Fri, 24 May 96 14:40:10 -0500

> -- [ From: Tim Shelton * EMC.Ver #2.5.02 ] --

> I've asked this question before but I have lost my replies.  Can someone
> please assist me again.  I need to delete an zip file within an application.
>  I don't want to shell out to execute the delete command.  I can not hard
> code the file name because it changes.  I can determine the file name but
> how do I delete it.

> Sincerely,

> Tim Shelton

You have to create the sturcture like this:

NameStr     String(50)

FileName   FILE,pre(Fil),Name(NameStr) ..... etc
Record       RECORD
xxx            string(255)    (it may have any declaration)
           . .

 code
   NameStr = 'MyFile.zip'
   remove(FileName)             ! I hope I remember well it is remove
   NameStr = 'MyFile2.exe'  
   remove(FileName)

 !!! The file MUST NOT be opened !!!  

 And, that's all.....
 If you want, you may have a look at generated REPORT module which
 has Redirection flag.

 Hope this helps.....
                                                Petr  



Thu, 12 Nov 1998 03:00:00 GMT  
 Delete a File

Quote:

>I've asked this question before but I have lost my replies.  Can someone
>please assist me again.  I need to delete an zip file within an application.
> I don't want to shell out to execute the delete command.  I can not hard
>code the file name because it changes.  I can determine the file name but
>how do I delete it.

I've used the ASCII file driver to handle file manipulation within
Clarion. Define a file, use a variable for the file name. Then use the
EMPTY command to erase it. Clarion also has builtin commands to do
this, they just don't tell anyone about them. Someone from Team
Topspeed may be able to help here. Another possibility is a DLL that
has common file functions exported. This has been done, maybe it can
be found on Icetips.

Jim


Arcturius Aleator  SCA - Buckston-on-Eno, Windmaster's Hill, Atlantia

"If builders built buildings like programmers write programs, then the first
 woodpecker to come along would destroy civilization."



Fri, 13 Nov 1998 03:00:00 GMT  
 Delete a File

Hi James, Tim,


Quote:
> >I've asked this question before but I have lost my replies.  Can someone
> >please assist me again.  I need to delete an zip file within an application.
> > I don't want to shell out to execute the delete command.  I can not hard
...
> I've used the ASCII file driver to handle file manipulation within
> Clarion. Define a file, use a variable for the file name. Then use the
> EMPTY command to erase it. Clarion also has builtin commands to do
> this, they just don't tell anyone about them. Someone from Team
> Topspeed may be able to help here. Another possibility is a DLL that
> has common file functions exported. This has been done, maybe it can
> be found on Icetips.

Should be there, I wrote one and put it there;)  But it's also easy
to define one file (doesn't matter what type of file) and just assign
the name and use Remove to delete it:

DeleteFileName STRING(255)

DeleteFile  FILE,DRIVE('DOS'),NAME(DeleteFileName)
            END

...

DeleteFileName = FileNameToDelete
Remove(DeleteFile)

This should do it!

Best regards,
+------------------------------------------------------------------+
|       Arnor Baldvinsson   &   Gudmundur Fr. Kristjansson         |
|     Mail address:  Vestergade 24, 7770 Vestervig, Denmark        |
|                    Phone:  +45 9794 1831                         |
|------------------------------------------------------------------|
| e-mail:                          Web sites:                      |

|                                    http://www.texinet.com        |
+------------------------------------------------------------------+



Fri, 13 Nov 1998 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Delete all files in Dir or delete Dir

2. deleting a file

3. Recover Deleted DBX file

4. Deleted .app File.. Need help desperately

5. remove/delete disk files

6. Delete INI File Section

7. delete temp files in CPD2110 app

8. How to delete all files in a folder from within app

9. Delete readonly files with c++

10. Deleting a file

11. CW2.003 - how to delete a file?

12. Delete a File -Reply

 

 
Powered by phpBB® Forum Software