Thanks.
for /d %a in (*)
seems to do it, if not a bit crudely.
"Pegasus [MVP]" <> wrote in message
news:...
>
> "Buck Turgidson" <> wrote in message
> news:hd1ua1$eeb$...
>>I need to delete files from a subdirectory under a bunch of profiles. In
>>other words, I have users john, jim, and jill as
>>
>> c:\documents and settings\john
>> c:\documents and settings\jim
>> c:\documents and settings\jill
>>
>> And each of their profiles has a subdirectory called apps. In each apps
>> file for them, I need to delete all .txt files, but only from the apps
>> subdirectory of their profile.
>>
>> c:\documents and settings\john\apps
>> c:\documents and settings\jim\apps
>> c:\documents and settings\jill\apps
>>
>> Can anyone help me?
>
> By far the simplest method is based on a batch file like so:
> @echo off
> for %%a in (John Jim Jill) do del /s "c:\Documents and
> Settings\%%a\apps\*.txt"
>
> Since the command consists of a single line, you could even type it at the
> Command Prompt like so:
> for %a in (John Jim Jill) do del /s "c:\Documents and
> Settings\%a\apps\*.txt"
> Note the double versus single % characters.
>
> Or maybe this:
> del /s "c:\Documents and Settings\John\apps\*.txt"
> del /s "c:\Documents and Settings\Jill\apps\*.txt"
> del /s "c:\Documents and Settings\Jim\apps\*.txt"
>
|