delete files

  • Thread starter Thread starter *ProteanThread*
  • Start date Start date
P

*ProteanThread*

looking for a util to delete all files in a given directory and
sub-directories but keep the directory structure intact?
 
*ProteanThread* said:
looking for a util to delete all files in a given directory and
sub-directories but keep the directory structure intact?

I haven't tested it. SO be *CAREFUL*. Try:

cd \path
del *.* /s



--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 5.10) Linux 2.6.16.16
^ ^ 14:55:01 up 23:22 0 users load average: 1.02 1.11 1.15
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
 
DEL [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names
ERASE [/P] [/F] [/S] [/Q] [/A[[:]attributes]] names

names Specifies a list of one or more files or directories.
Wildcards may be used to delete multiple files. If a
directory is specified, all files within the directory
will be deleted.

/P Prompts for confirmation before deleting each file.
/F Force deleting of read-only files.
/S Delete specified files from all subdirectories.
/Q Quiet mode, do not ask if ok to delete on global wildcard
/A Selects files to delete based on attributes
attributes R Read-only files S System files
H Hidden files A Files ready for archiving
- Prefix meaning not

so.... del c:\your_dir\*.* /s /q /f and.... rock and roll man ! ;-)
 
so.... del c:\your_dir\*.* /s /q /f and.... rock and roll man ! ;-)

Oh man! Careful... :)

--
.~. Might, Courage, Vision, SINCERITY. http://www.linux-sxs.org
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Ubuntu 5.10) Linux 2.6.16.16
^ ^ 20:13:01 up 1 day 4:40 0 users load average: 1.15 1.03 1.03
news://news.3home.net news://news.hkpcug.org news://news.newsgroup.com.hk
 
*ProteanThread* said:
looking for a util to delete all files in a given directory and
sub-directories but keep the directory structure intact?

Perhaps just copy the directory structure instead?

Program: TreeCopy
Author: RJL Software
Ware: Freeware
http://www.rjlsoftware.com/

http://www.rjlsoftware.com/software/utility/treecopy/
http://www.rjlsoftware.com/software/utility/treecopy/download.shtml
Compressed .ZIP File (295 K)
http://www.rjlsoftware.com/download/treecopy.zip
Self-Extracting EXE file (301 K)
http://www.rjlsoftware.com/download/exe/treecopy.exe

<q>
Have you ever needed to copy a directory structure without copying the
files? TreeCopy now makes this possible. Our small program will allow
you to select the "from directory" and "into directory", and it will
proceed to copy ONLY the directory structure. The utility is bundled
with functionality such as a command line interface, calculate
directories, Windows XP look and feel and much, much more!
</q>

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
*ProteanThread* said:
looking for a util to delete all files in a given directory and
sub-directories but keep the directory structure intact?

This can be done easily with XYplorer (View > Show Info Panel), but as this
program is now payware I cannot post an URL. Does anyone have a link to the
last freeware version?

===

Frank Bohan
¶ Political power grows out of the barrel of a gun.
 
This can be done easily with XYplorer (View > Show Info Panel), but as this
program is now payware I cannot post an URL. Does anyone have a link to the
last freeware version?

See the Pricelessware description:
http://www.pricelesswarehome.org/2006/PL2006FILEUTILITIES.php#0778-PW

Susan
--
Posted to alt.comp.freeware
Search alt.comp.freeware (or read it online):
http://www.google.com/advanced_group_search?q=+group:alt.comp.freeware
Pricelessware & ACF: http://www.pricelesswarehome.org
Pricelessware: http://www.pricelessware.org (not maintained)
 
I haven't tested it. SO be *CAREFUL*. Try:

cd \path
del *.* /s

Better yet since it works in any directrory is:

DEL /S /Q C:\FOO\*.*

where C:\FOO is an example of the first sudir you want
to include in the chain of subdirs. The /Q switch (quiet)
makes it automatic (no questions asked). It lists on
the screen all files deleted. Variations might be:

DEL /S /Q C:\FOO\*.* >NUL
to keep it perfectly quiet, or:

DEL /S /Q C:\FOO\*.* >FOO.TXT
to pipe the list of files deleted to a text file.

Yes, I have tested this on test subdirectory structures
in Win 2K and it works ok. Obviously, this sort of thing
is dangerous. Be very careful to type the path of the
first subdir exactly.

Art
http://home.epix.net/~artnpeg
 
Back
Top