1. Deleting folders with files

Heya,

How can I delete a folder containing files?

Kenneth/ZNorQ

new topic     » topic index » view message » categorize

2. Re: Deleting folders with files

ZNorQ wrote:
> 
> Heya,
> 
> How can I delete a folder containing files?

Because you used the word 'folder' I assume you are using Windows and not Linux.

The command to use in Win2000, XP, and Vista is ...

   rmdir /S /Q dirname

e.g.
   rmdir /S /Q c:\temp\workarea

To use this from within a Euphoria program you need to use the system
statement...

e.g.

   system ("rmdir /S /Q c:\\temp\\workarea", 2)

The '2' is in the second parameter so it doesn't clear the screen or change the
graphics mode on the console.


In the *nix world, the command is ...

  rm -rf dirname

e.g.
   system ("rm -rf /temp/workarea", 2)

-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

3. Re: Deleting folders with files

Derek Parnell wrote:
> 
> ZNorQ wrote:
> > 
> > Heya,
> > 
> > How can I delete a folder containing files?
> 
> Because you used the word 'folder' I assume you are using Windows and not
> Linux.

Correct, sorry for being abit vague.

> 
> The command to use in Win2000, XP, and Vista is ...
> 
>    rmdir /S /Q dirname
> 
> e.g.
>    rmdir /S /Q c:\temp\workarea
> 
> To use this from within a Euphoria program you need to use the system
> statement...
> 
> e.g.
> 
>    system ("rmdir /S /Q c:\\temp\\workarea", 2)
> 
> The '2' is in the second parameter so it doesn't clear the screen or change
> the graphics mode on the console.
> 
> 
> In the *nix world, the command is ...
> 
>   rm -rf dirname
> 
> e.g.
>    system ("rm -rf /temp/workarea", 2)
> 
> -- 
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell

I know about the rmdir/rd in windows, I was kind of hoping that there where own
set of functions in the Euphoria language that could handle this - or atleast in
Win32Lib.

The rmdir/rd will have to do. Thanks for the help, Derek.

Kenneth/ZNorQ

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

4. Re: Deleting folders with files

ZNorQ wrote:
> I was kind of hoping that there where own set of functions
> in the Euphoria language that could handle this

[Watch this space ...]


-- 
Derek Parnell
Melbourne, Australia
Skype name: derek.j.parnell

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

5. Re: Deleting folders with files

ZNorQ wrote:
> 
> 
> I know about the rmdir/rd in windows, I was kind of hoping that there where
> own set of functions in the Euphoria language that could handle this - or
> atleast
> in Win32Lib.
> 
> The rmdir/rd will have to do. Thanks for the help, Derek.
> 

Unfortunately that will not always work. That only works on Windows XP/Vista. On
Win 95/98/ME you will need to use deltree, which is not available then on Windows
XP/Vista.

I am thinking maybe we need basic file system manipulation commands in 4.0
standard library such as:

delete, copy, move, exists, etc...

--
Jeremy Cowgar
http://jeremy.cowgar.com

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

6. Re: Deleting folders with files

I proposed a library for file manipulation about 
one month ago and had not good answer.  Some 
people said is useless and non popular.

Is very important that as dir() the function works 
the same on any platform.

+-+-+-+-+-+-+-+
Marco A. Achury
Caracas, Venezuela

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

7. Re: Deleting folders with files

Jeremy Cowgar wrote:
> 
> ZNorQ wrote:
> > 
> > 
> > I know about the rmdir/rd in windows, I was kind of hoping that there where
> > own set of functions in the Euphoria language that could handle this - or
> > atleast
> > in Win32Lib.
> > 
> > The rmdir/rd will have to do. Thanks for the help, Derek.
> > 
> 
> Unfortunately that will not always work. That only works on Windows XP/Vista.
> On Win 95/98/ME you will need to use deltree, which is not available then on
> Windows XP/Vista.
> 
> I am thinking maybe we need basic file system manipulation commands in 4.0
> standard
> library such as:
> 
> delete, copy, move, exists, etc...
> 
> --
> Jeremy Cowgar
> <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>

I think Aku submitted such a lib to the Archive.

CChris

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

8. Re: Deleting folders with files

CChris wrote:
> 
> Jeremy Cowgar wrote:
> > 
> > ZNorQ wrote:
> > > 
> > > 
> > > I know about the rmdir/rd in windows, I was kind of hoping that there
> > > where
> > > own set of functions in the Euphoria language that could handle this - or
> > > atleast
> > > in Win32Lib.
> > > 
> > > The rmdir/rd will have to do. Thanks for the help, Derek.
> > > 
> > 
> > Unfortunately that will not always work. That only works on Windows
> > XP/Vista.
> > On Win 95/98/ME you will need to use deltree, which is not available then on
> > Windows XP/Vista.
> > 
> > I am thinking maybe we need basic file system manipulation commands in 4.0
> > standard
> > library such as:
> > 
> > delete, copy, move, exists, etc...
> > 
> > --
> > Jeremy Cowgar
> > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
> 
> I think Aku submitted such a lib to the Archive.

So did Jeffrey Fielding and Brian Broker (win32fil.e).

Kat

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

9. Re: Deleting folders with files

Kat wrote:
> 
> CChris wrote:
> > 
> > Jeremy Cowgar wrote:
> > > 
> > > ZNorQ wrote:
> > > > 
> > > > 
> > > > I know about the rmdir/rd in windows, I was kind of hoping that there
> > > > where
> > > > own set of functions in the Euphoria language that could handle this -
> > > > or
> atleast</font></i>
> > > > in Win32Lib.
> > > > 
> > > > The rmdir/rd will have to do. Thanks for the help, Derek.
> > > > 
> > > 
> > > Unfortunately that will not always work. That only works on Windows
> > > XP/Vista.
> > > On Win 95/98/ME you will need to use deltree, which is not available then
> > > on
> > > Windows XP/Vista.
> > > 
> > > I am thinking maybe we need basic file system manipulation commands in 4.0
> > > standard
> > > library such as:
> > > 
> > > delete, copy, move, exists, etc...
> > > 
> > > --
> > > Jeremy Cowgar
> > > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
> > 
> > I think Aku submitted such a lib to the Archive.
> 
> So did Jeffrey Fielding and Brian Broker (win32fil.e).
> 
> Kat

And Chris Bensler wrote one a few years back?

    Lucius L. Hilley III - Unkmar

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

10. Re: Deleting folders with files

Kat wrote:
> 
> CChris wrote:
> > 
> > Jeremy Cowgar wrote:
> > > 
> > > ZNorQ wrote:
> > > > 
> > > > 
> > > > I know about the rmdir/rd in windows, I was kind of hoping that there
> > > > where
> > > > own set of functions in the Euphoria language that could handle this -
> > > > or
> atleast</font></i>
> > > > in Win32Lib.
> > > > 
> > > > The rmdir/rd will have to do. Thanks for the help, Derek.
> > > > 
> > > 
> > > Unfortunately that will not always work. That only works on Windows
> > > XP/Vista.
> > > On Win 95/98/ME you will need to use deltree, which is not available then
> > > on
> > > Windows XP/Vista.
> > > 
> > > I am thinking maybe we need basic file system manipulation commands in 4.0
> > > standard
> > > library such as:
> > > 
> > > delete, copy, move, exists, etc...
> > > 
> > > --
> > > Jeremy Cowgar
> > > <a href="http://jeremy.cowgar.com">http://jeremy.cowgar.com</a>
> > 
> > I think Aku submitted such a lib to the Archive.
> 
> So did Jeffrey Fielding and Brian Broker (win32fil.e).
> 
> Kat

Found the win32fil.ew which seems to contain what I need. Good thing I didn't
need to use those blasted dos cmds.

Thanks folks!

Kenneth/ZNorQ

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

11. Re: Deleting folders with files

Marco Achury wrote:
> 
> I proposed a library for file manipulation about 
> one month ago and had not good answer.  Some 
> people said is useless and non popular.
> 
> Is very important that as dir() the function works 
> the same on any platform.
> 
> +-+-+-+-+-+-+-+
> Marco A. Achury
> Caracas, Venezuela

Pretty strange thing to say, but I guess the reason for saying so is that there
are problably many of those libs already out there. I'd say that this should be
an obvious inclusion in the core library of Euphoria (file.e?).

Kenneth/ZNorQ

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

12. Re: Deleting folders with files

ZNorQ wrote:
> 
> Marco Achury wrote:
> > 
> > I proposed a library for file manipulation about 
> > one month ago and had not good answer.  Some 
> > people said is useless and non popular.
> > 
> > Is very important that as dir() the function works 
> > the same on any platform.
> > 
> > +-+-+-+-+-+-+-+
> > Marco A. Achury
> > Caracas, Venezuela
> 
> Pretty strange thing to say, but I guess the reason for saying so is that
> there
> are problably many of those libs already out there. I'd say that this should
> be an obvious inclusion in the core library of Euphoria (file.e?).

Along with the functions that earlier OSs lack, such as access to files over
4gbytes, or 200,000 files per folder, etc.

Kat

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

Search



Quick Links

User menu

Not signed in.

Misc Menu