1. How would I delete all files from a directory or specific files

------=_NextPart_000_0014_01C0A4DD.534A9BA0
	charset="iso-8859-1"

Hi!

I would like to delete all files in a specific directory. Could someone =
tell me how I would do this, or how I could search for a specific file =
then delete it?

Thanks

Martin

------=_NextPart_000_0014_01C0A4DD.534A9BA0
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi!</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I would like to delete all files in a =
specific=20
directory. Could someone tell me how I would do this, or how I could =
search for=20
a specific file then delete it?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Martin</FONT></DIV>
------=_NextPart_000_0014_01C0A4DD.534A9BA0--

new topic     » topic index » view message » categorize

2. Re: How would I delete all files from a directory or specific files

Use system("del *",2) for DOS32 WIN32
and system("rm *",2) for Linux

"del *" would mean all files
"del *.doc" would mean all files ending in .doc

Be careful, make sure you're in the right directory..
You could wipe out you're source code.

You might also want to look at current_dir() and dir()
in the Library.doc file.

-Humberto
--- tuncaydin6 at tuncaydin6.screaming.net wrote:
> Hi!
> 
> I would like to delete all files in a specific
> directory. Could someone tell me how I would do
> this, or how I could search for a specific file then
> delete it?
> 
> Thanks
> 
> Martin

new topic     » goto parent     » topic index » view message » categorize

3. Re: How would I delete all files from a directory or specific files

On 4 Mar 2001, at 12:05, Humberto wrote:

> You could wipe out you're source code.

you're != your
you're = you are
your = it belongs to you

Kat

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu