Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Old programmers never die, they just become managers.


tech / sci.electronics.design / Windows batch file help

SubjectAuthor
* Windows batch file helpJohn Larkin
+- Re: Windows batch file helpJoe Gwinn
+- Re:Windows batch file helpMartin Rid
+- Re: Windows batch file helpJohn May
+* Re: Windows batch file helpLasse Langwadt Christensen
|`* Re: Windows batch file helpJohn Larkin
| `- Re: Windows batch file helpJasen Betts
+* Re: Windows batch file helpCydrome Leader
|+- Re: Windows batch file helpRicky
|`- Re: Windows batch file helpMartin Brown
+* Re: Windows batch file helpDecadentLinuxUserNumeroUno
|`- Re: Windows batch file helpLasse Langwadt Christensen
`- Re: Windows batch file helpKlaus Vestergaard Kragelund

1
Windows batch file help

<ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112905&group=sci.electronics.design#112905

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!news.uzoreto.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!69.80.99.23.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 25 Dec 2022 16:04:08 +0000
From: jlar...@highlandSNIPMEtechnology.com (John Larkin)
Newsgroups: sci.electronics.design
Subject: Windows batch file help
Date: Sun, 25 Dec 2022 08:04:08 -0800
Organization: Highland Tech
Reply-To: xx@yy.com
Message-ID: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 20
X-Trace: sv3-XEMm806EWL85eu5LfHpqlwPnQLH5aR6qcSrP2RnKkuqhAwVjDHZatqjLGK0iNVuuoa/V12ocMnXKQCo!QKCGLTh94uCHgKK+yJnbWG1CKDp2WAhLDiun0NS7sVEoz8/KXguaEcUM9EGqsmH0k4lVyZQiwLRc!srLpBw==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: John Larkin - Sun, 25 Dec 2022 16:04 UTC

Given a folder C:\Protos, I want a batch file to find all sub-folders,
possibly a few levels deep, called OLD, and delete all of them. I
can't make that work.

When we develop a prototype PCB, we name iterations board1, board2,
etc, and drag the old ones into an OLD folder until it's done. Spice
folders get a OLD sub-folder too.

Windows batch files don't make a lot of sense to me. Too many
ambiguities.

For example,

C:\Protos\Z540_P940_Load_Board\PCB\OLD

is full of obsolete iterations.

Re: Windows batch file help

<r8vgqhhhgmk3fkbvfi4e88s7496aoigk3k@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112907&group=sci.electronics.design#112907

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!Xl.tags.giganews.com!local-1.nntp.ord.giganews.com!news.giganews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 25 Dec 2022 16:43:00 +0000
From: joegw...@comcast.net (Joe Gwinn)
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Date: Sun, 25 Dec 2022 11:42:59 -0500
Message-ID: <r8vgqhhhgmk3fkbvfi4e88s7496aoigk3k@4ax.com>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
User-Agent: ForteAgent/8.00.32.1272
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 28
X-Usenet-Provider: http://www.giganews.com
X-Trace: sv3-DtcQ7mpPZKB+gIr3pr8Cbov+a3AxKkdp3gV411YrPxvz2mbb+3PPkQuczXhyd2SV8ReFPDBy850A+mF!Infc2es0TtLSuA5Km5xvoPf+1xeLmlcDUJAhGvwgN+YnMoVSBhGI17AL+QE/QLFzPbJVrh0=
X-Complaints-To: abuse@giganews.com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
 by: Joe Gwinn - Sun, 25 Dec 2022 16:42 UTC

On Sun, 25 Dec 2022 08:04:08 -0800, John Larkin
<jlarkin@highlandSNIPMEtechnology.com> wrote:

>
>
>Given a folder C:\Protos, I want a batch file to find all sub-folders,
>possibly a few levels deep, called OLD, and delete all of them. I
>can't make that work.
>
>When we develop a prototype PCB, we name iterations board1, board2,
>etc, and drag the old ones into an OLD folder until it's done. Spice
>folders get a OLD sub-folder too.
>
>Windows batch files don't make a lot of sense to me. Too many
>ambiguities.
>
>For example,
>
>C:\Protos\Z540_P940_Load_Board\PCB\OLD
>
>is full of obsolete iterations.

I'm afraid to delete old versions, because sometimes I need to go back
and recover some lost item, or recover from a edit fumble. So I
collect all such in a process archive of some kind, and keep it
forever.

Joe Gwinn

Re:Windows batch file help

<toa01u$2qfi3$1@dont-email.me>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112908&group=sci.electronics.design#112908

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: martin_r...@verison.net (Martin Rid)
Newsgroups: sci.electronics.design
Subject: Re:Windows batch file help
Date: Sun, 25 Dec 2022 12:08:14 -0500 (EST)
Organization: news.eternal-september.org
Lines: 14
Message-ID: <toa01u$2qfi3$1@dont-email.me>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 25 Dec 2022 17:08:14 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="03e861a2a7a49dc64f0c1647fe39ea77";
logging-data="2965059"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18F+pftb/3AVAcGrE5ywSoL"
Cancel-Lock: sha1:Dqy8upKrK3ROmmNfRhMc3eaLxCw=
X-Newsreader: PiaoHong.Usenet.Client.Free:2.02
 by: Martin Rid - Sun, 25 Dec 2022 17:08 UTC

John Larkin <jlarkin@highlandSNIPMEtechnology.com> Wrote in message:r
> Given a folder C:\Protos, I want a batch file to find all sub-folders,possibly a few levels deep, called OLD, and delete all of them. Ican't make that work.When we develop a prototype PCB, we name iterations board1, board2,etc, and drag the old ones into an OLD folder until it's done. Spicefolders get a OLD sub-folder too. Windows batch files don't make a lot of sense to me. Too manyambiguities.For example, C:\Protos\Z540_P940_Load_Board\PCB\OLDis full of obsolete iterations.

It gets clunky, but not impossible. You could do a 'find' and
redirect that output to a text file, the call another bat file to
use the find results to delete. Powershell may have something
smoother.

Cheers
--

----Android NewsGroup Reader----
https://piaohong.s3-us-west-2.amazonaws.com/usenet/index.html

Re: Windows batch file help

<0b8b878f-4ea0-48fd-9a34-c9c1d1c8d65en@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112917&group=sci.electronics.design#112917

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ac8:724d:0:b0:3a8:28a6:d03 with SMTP id l13-20020ac8724d000000b003a828a60d03mr467098qtp.538.1671994636791;
Sun, 25 Dec 2022 10:57:16 -0800 (PST)
X-Received: by 2002:ac8:706:0:b0:3a8:29b0:68eb with SMTP id
g6-20020ac80706000000b003a829b068ebmr744985qth.659.1671994636639; Sun, 25 Dec
2022 10:57:16 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 25 Dec 2022 10:57:16 -0800 (PST)
In-Reply-To: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=95.172.225.182; posting-account=uFsNWgoAAAA2iyM9I1zPPuvl5W-JBU1g
NNTP-Posting-Host: 95.172.225.182
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <0b8b878f-4ea0-48fd-9a34-c9c1d1c8d65en@googlegroups.com>
Subject: Re: Windows batch file help
From: suna...@gmail.com (John May)
Injection-Date: Sun, 25 Dec 2022 18:57:16 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 1941
 by: John May - Sun, 25 Dec 2022 18:57 UTC

On Sunday, December 25, 2022 at 4:04:20 PM UTC, John Larkin wrote:
> Given a folder C:\Protos, I want a batch file to find all sub-folders,
> possibly a few levels deep, called OLD, and delete all of them. I
> can't make that work.
>
> When we develop a prototype PCB, we name iterations board1, board2,
> etc, and drag the old ones into an OLD folder until it's done. Spice
> folders get a OLD sub-folder too.
>
> Windows batch files don't make a lot of sense to me. Too many
> ambiguities.
>
> For example,
>
> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>
> is full of obsolete iterations.

Download XYplorer, it can find and list named files or directories starting from any location. It is one of the alternative to the standard windows file manager, and I would think most of the others also have this capability.

Re: Windows batch file help

<c7a82b00-5599-4b10-ba85-c2530c72622en@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112920&group=sci.electronics.design#112920

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:ae9:e204:0:b0:6ff:a7f1:ff4e with SMTP id c4-20020ae9e204000000b006ffa7f1ff4emr495716qkc.292.1671996912840;
Sun, 25 Dec 2022 11:35:12 -0800 (PST)
X-Received: by 2002:ac8:45cc:0:b0:3a7:f59a:2990 with SMTP id
e12-20020ac845cc000000b003a7f59a2990mr635501qto.264.1671996912637; Sun, 25
Dec 2022 11:35:12 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 25 Dec 2022 11:35:12 -0800 (PST)
In-Reply-To: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
Injection-Info: google-groups.googlegroups.com; posting-host=77.213.100.59; posting-account=mW5JKwkAAAAMyuWOVeLp8yffyAkVx0g7
NNTP-Posting-Host: 77.213.100.59
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <c7a82b00-5599-4b10-ba85-c2530c72622en@googlegroups.com>
Subject: Re: Windows batch file help
From: langw...@fonz.dk (Lasse Langwadt Christensen)
Injection-Date: Sun, 25 Dec 2022 19:35:12 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 1885
 by: Lasse Langwadt Chris - Sun, 25 Dec 2022 19:35 UTC

søndag den 25. december 2022 kl. 17.04.20 UTC+1 skrev John Larkin:
> Given a folder C:\Protos, I want a batch file to find all sub-folders,
> possibly a few levels deep, called OLD, and delete all of them. I
> can't make that work.
>
> When we develop a prototype PCB, we name iterations board1, board2,
> etc, and drag the old ones into an OLD folder until it's done. Spice
> folders get a OLD sub-folder too.
>
> Windows batch files don't make a lot of sense to me. Too many
> ambiguities.
>
> For example,
>
> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>
> is full of obsolete iterations.

https://code.adonline.id.au/powershell-delete-folders-based-on-name/

?

Re: Windows batch file help

<sgahqh9jaujlru101phm9sb64lokqh02in@4ax.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112921&group=sci.electronics.design#112921

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!feeder.usenetexpress.com!tr1.iad1.usenetexpress.com!69.80.99.26.MISMATCH!Xl.tags.giganews.com!local-2.nntp.ord.giganews.com!nntp.supernews.com!news.supernews.com.POSTED!not-for-mail
NNTP-Posting-Date: Sun, 25 Dec 2022 19:54:16 +0000
From: jlar...@highlandSNIPMEtechnology.com (John Larkin)
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Date: Sun, 25 Dec 2022 11:54:16 -0800
Organization: Highland Tech
Reply-To: xx@yy.com
Message-ID: <sgahqh9jaujlru101phm9sb64lokqh02in@4ax.com>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com> <c7a82b00-5599-4b10-ba85-c2530c72622en@googlegroups.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Lines: 29
X-Trace: sv3-P0uKGpriZbvy5AVtINYoOZ3V90YL/K8DpCMY1qtJwR7oEmlX24693Bd0HL0k16gzQloEoAOdsZBJvGj!5cMpmmFN/2asCcFzikMZd0vpMd9rXMeV4P9i3cNLdMIYsq0nN2OJVQ9FlVWokvi6/EwzqswlzMYv!VyHwNw==
X-Complaints-To: www.supernews.com/docs/abuse.html
X-DMCA-Complaints-To: www.supernews.com/docs/dmca.html
X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly
X-Postfilter: 1.3.40
X-Received-Bytes: 2182
 by: John Larkin - Sun, 25 Dec 2022 19:54 UTC

On Sun, 25 Dec 2022 11:35:12 -0800 (PST), Lasse Langwadt Christensen
<langwadt@fonz.dk> wrote:

>søndag den 25. december 2022 kl. 17.04.20 UTC+1 skrev John Larkin:
>> Given a folder C:\Protos, I want a batch file to find all sub-folders,
>> possibly a few levels deep, called OLD, and delete all of them. I
>> can't make that work.
>>
>> When we develop a prototype PCB, we name iterations board1, board2,
>> etc, and drag the old ones into an OLD folder until it's done. Spice
>> folders get a OLD sub-folder too.
>>
>> Windows batch files don't make a lot of sense to me. Too many
>> ambiguities.
>>
>> For example,
>>
>> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>>
>> is full of obsolete iterations.
>
>https://code.adonline.id.au/powershell-delete-folders-based-on-name/
>
>?

Yikes. Maybe I'll just have someone do it.

I could write a PowerBasic program, I guess.

Re: Windows batch file help

<toaljm$5ov$3@reader2.panix.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112931&group=sci.electronics.design#112931

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!panix!.POSTED.panix2.panix.com!not-for-mail
From: prese...@MUNGEpanix.com (Cydrome Leader)
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Date: Sun, 25 Dec 2022 23:16:06 -0000 (UTC)
Organization: PANIX Public Access Internet and UNIX, NYC
Message-ID: <toaljm$5ov$3@reader2.panix.com>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
Injection-Date: Sun, 25 Dec 2022 23:16:06 -0000 (UTC)
Injection-Info: reader2.panix.com; posting-host="panix2.panix.com:166.84.1.2";
logging-data="5919"; mail-complaints-to="abuse@panix.com"
User-Agent: tin/2.6.0-20210823 ("Coleburn") (NetBSD/9.3 (amd64))
 by: Cydrome Leader - Sun, 25 Dec 2022 23:16 UTC

John Larkin <jlarkin@highlandsnipmetechnology.com> wrote:
>
>
> Given a folder C:\Protos, I want a batch file to find all sub-folders,
> possibly a few levels deep, called OLD, and delete all of them. I
> can't make that work.
>
> When we develop a prototype PCB, we name iterations board1, board2,
> etc, and drag the old ones into an OLD folder until it's done. Spice
> folders get a OLD sub-folder too.
>
> Windows batch files don't make a lot of sense to me. Too many
> ambiguities.
>
> For example,
>
> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>
> is full of obsolete iterations.

start with this to get the list of dirs to delete

cd c:\Protos

dir /AD OLD /s /B

you may need a lowercase b, you never mentioned what version of windows you're running.

Re: Windows batch file help

<6c15050c-a60c-4830-adc6-101db8c06691n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112932&group=sci.electronics.design#112932

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:622a:1b0f:b0:3a9:7719:2175 with SMTP id bb15-20020a05622a1b0f00b003a977192175mr640859qtb.651.1672015467102;
Sun, 25 Dec 2022 16:44:27 -0800 (PST)
X-Received: by 2002:a05:6214:4283:b0:4c7:9882:a6eb with SMTP id
og3-20020a056214428300b004c79882a6ebmr907460qvb.40.1672015466881; Sun, 25 Dec
2022 16:44:26 -0800 (PST)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Sun, 25 Dec 2022 16:44:26 -0800 (PST)
In-Reply-To: <toaljm$5ov$3@reader2.panix.com>
Injection-Info: google-groups.googlegroups.com; posting-host=65.207.89.54; posting-account=I-_H_woAAAA9zzro6crtEpUAyIvzd19b
NNTP-Posting-Host: 65.207.89.54
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com> <toaljm$5ov$3@reader2.panix.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <6c15050c-a60c-4830-adc6-101db8c06691n@googlegroups.com>
Subject: Re: Windows batch file help
From: gnuarm.d...@gmail.com (Ricky)
Injection-Date: Mon, 26 Dec 2022 00:44:27 +0000
Content-Type: text/plain; charset="UTF-8"
X-Received-Bytes: 2275
 by: Ricky - Mon, 26 Dec 2022 00:44 UTC

On Sunday, December 25, 2022 at 6:16:13 PM UTC-5, Cydrome Leader wrote:
> John Larkin <jla...@highlandsnipmetechnology.com> wrote:
> >
> >
> > Given a folder C:\Protos, I want a batch file to find all sub-folders,
> > possibly a few levels deep, called OLD, and delete all of them. I
> > can't make that work.
> >
> > When we develop a prototype PCB, we name iterations board1, board2,
> > etc, and drag the old ones into an OLD folder until it's done. Spice
> > folders get a OLD sub-folder too.
> >
> > Windows batch files don't make a lot of sense to me. Too many
> > ambiguities.
> >
> > For example,
> >
> > C:\Protos\Z540_P940_Load_Board\PCB\OLD
> >
> > is full of obsolete iterations.
> start with this to get the list of dirs to delete
>
> cd c:\Protos
>
> dir /AD OLD /s /B
>
> you may need a lowercase b, you never mentioned what version of windows you're running.

Probably 3.0. He wants to upgrade to 3.1 to use USB, but can't find a Floppy drive that's not USB. lol

--

Rick C.

- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209

Re: Windows batch file help

<tocen1$1i57$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=112967&group=sci.electronics.design#112967

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!M4ppzUK+4qnV71h6XIqHtw.user.46.165.242.75.POSTED!not-for-mail
From: '''newsp...@nonad.co.uk (Martin Brown)
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Date: Mon, 26 Dec 2022 15:30:41 +0000
Organization: Aioe.org NNTP Server
Message-ID: <tocen1$1i57$1@gioia.aioe.org>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
<toaljm$5ov$3@reader2.panix.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="51367"; posting-host="M4ppzUK+4qnV71h6XIqHtw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
Content-Language: en-GB
X-Notice: Filtered by postfilter v. 0.9.2
 by: Martin Brown - Mon, 26 Dec 2022 15:30 UTC

On 25/12/2022 23:16, Cydrome Leader wrote:
> John Larkin <jlarkin@highlandsnipmetechnology.com> wrote:
>>
>>
>> Given a folder C:\Protos, I want a batch file to find all sub-folders,
>> possibly a few levels deep, called OLD, and delete all of them. I
>> can't make that work.
>>
>> When we develop a prototype PCB, we name iterations board1, board2,
>> etc, and drag the old ones into an OLD folder until it's done. Spice
>> folders get a OLD sub-folder too.
>>
>> Windows batch files don't make a lot of sense to me. Too many
>> ambiguities.
>>
>> For example,
>>
>> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>>
>> is full of obsolete iterations.
>
> start with this to get the list of dirs to delete
>
> cd c:\Protos
>
> dir /AD OLD /s /B
>
> you may need a lowercase b, you never mentioned what version of windows you're running.

ITYM

dir /ad .\old /s /b >badbatch.txt

Otherwise it will falsely match things like bold cold fold folder told
I think my search pattern is safe buit may still catch things you don't
want to be zapped so double check its output!

Then edlin badbatch.txt

r/C:/del C:/
w q

I'd check it out manually first - my edlin is a little rusty.
(and I bet edlin won't run on modern Windoze PCs)

It is basically just to tack "del " on the front of each line.

--
Regards,
Martin Brown

Re: Windows batch file help

<tocpog$ak7$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=113007&group=sci.electronics.design#113007

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!5U2ooNuM5UP0Ynf/GmOnCg.user.46.165.242.91.POSTED!not-for-mail
From: Decadent...@decadence.org
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Date: Mon, 26 Dec 2022 18:39:12 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <tocpog$ak7$1@gioia.aioe.org>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
Injection-Info: gioia.aioe.org; logging-data="10887"; posting-host="5U2ooNuM5UP0Ynf/GmOnCg.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Xnews/5.04.25
X-Notice: Filtered by postfilter v. 0.9.2
 by: Decadent...@decadence.org - Mon, 26 Dec 2022 18:39 UTC

John Larkin <jlarkin@highlandSNIPMEtechnology.com> wrote in
news:ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com:

>
>
> Given a folder C:\Protos, I want a batch file to find all
> sub-folders, possibly a few levels deep, called OLD, and delete
> all of them. I can't make that work.
>
> When we develop a prototype PCB, we name iterations board1,
> board2, etc, and drag the old ones into an OLD folder until it's
> done. Spice folders get a OLD sub-folder too.
>
> Windows batch files don't make a lot of sense to me. Too many
> ambiguities.
>
> For example,
>
> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>
> is full of obsolete iterations.

Windows 10 allows one to have a Linux session within windows.
Linux batch scripting is far more advanced.

It might not like the NTFS thing though.

You could use it to establish a list, which a Windows Power Shell
batch file then uses for the deletion task.

Re: Windows batch file help

<cfebcfb2-48d8-4515-b4b7-b1d3eb641769n@googlegroups.com>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=113041&group=sci.electronics.design#113041

  copy link   Newsgroups: sci.electronics.design
X-Received: by 2002:a05:620a:270d:b0:6fa:f354:939f with SMTP id b13-20020a05620a270d00b006faf354939fmr799469qkp.57.1672111013517;
Mon, 26 Dec 2022 19:16:53 -0800 (PST)
X-Received: by 2002:ad4:548f:0:b0:50c:bbc4:12f7 with SMTP id
pv15-20020ad4548f000000b0050cbbc412f7mr773792qvb.87.1672111013357; Mon, 26
Dec 2022 19:16:53 -0800 (PST)
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!border-2.nntp.ord.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: sci.electronics.design
Date: Mon, 26 Dec 2022 19:16:53 -0800 (PST)
In-Reply-To: <tocpog$ak7$1@gioia.aioe.org>
Injection-Info: google-groups.googlegroups.com; posting-host=77.213.100.59; posting-account=mW5JKwkAAAAMyuWOVeLp8yffyAkVx0g7
NNTP-Posting-Host: 77.213.100.59
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com> <tocpog$ak7$1@gioia.aioe.org>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <cfebcfb2-48d8-4515-b4b7-b1d3eb641769n@googlegroups.com>
Subject: Re: Windows batch file help
From: langw...@fonz.dk (Lasse Langwadt Christensen)
Injection-Date: Tue, 27 Dec 2022 03:16:53 +0000
Content-Type: text/plain; charset="UTF-8"
Lines: 27
 by: Lasse Langwadt Chris - Tue, 27 Dec 2022 03:16 UTC

mandag den 26. december 2022 kl. 19.39.18 UTC+1 skrev DecadentLinux...@decadence.org:
> John Larkin <jla...@highlandSNIPMEtechnology.com> wrote in
> news:ifsgqhp406799vf7l...@4ax.com:
> >
> >
> > Given a folder C:\Protos, I want a batch file to find all
> > sub-folders, possibly a few levels deep, called OLD, and delete
> > all of them. I can't make that work.
> >
> > When we develop a prototype PCB, we name iterations board1,
> > board2, etc, and drag the old ones into an OLD folder until it's
> > done. Spice folders get a OLD sub-folder too.
> >
> > Windows batch files don't make a lot of sense to me. Too many
> > ambiguities.
> >
> > For example,
> >
> > C:\Protos\Z540_P940_Load_Board\PCB\OLD
> >
> > is full of obsolete iterations.
> Windows 10 allows one to have a Linux session within windows.
> Linux batch scripting is far more advanced.
>
> It might not like the NTFS thing though.

WSL is fully integrated with windows, just cd to \mnt\c in linux

Re: Windows batch file help

<toeb4g$gf6$3@gonzo.revmaps.no-ip.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=113055&group=sci.electronics.design#113055

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!feed1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!fx10.iad.POSTED!not-for-mail
From: use...@revmaps.no-ip.org (Jasen Betts)
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Organization: JJ's own news server
Message-ID: <toeb4g$gf6$3@gonzo.revmaps.no-ip.org>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
<c7a82b00-5599-4b10-ba85-c2530c72622en@googlegroups.com>
<sgahqh9jaujlru101phm9sb64lokqh02in@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 27 Dec 2022 08:41:52 -0000 (UTC)
Injection-Info: gonzo.revmaps.no-ip.org; posting-host="localhost:127.0.0.1";
logging-data="16870"; mail-complaints-to="usenet@gonzo.revmaps.no-ip.org"
User-Agent: slrn/1.0.3 (Linux)
X-Face: ?)Aw4rXwN5u0~$nqKj`xPz>xHCwgi^q+^?Ri*+R(&uv2=E1Q0Zk(>h!~o2ID@6{uf8s;a
+M[5[U[QT7xFN%^gR"=tuJw%TXXR'Fp~W;(T"1(739R%m0Yyyv*gkGoPA.$b,D.w:z+<'"=-lVT?6
{T?=R^:W5g|E2#EhjKCa+nt":4b}dU7GYB*HBxn&Td$@f%.kl^:7X8rQWd[NTc"P"u6nkisze/Q;8
"9Z{peQF,w)7UjV$c|RO/mQW/NMgWfr5*$-Z%u46"/00mx-,\R'fLPe.)^
Lines: 37
X-Complaints-To: https://www.astraweb.com/aup
NNTP-Posting-Date: Tue, 27 Dec 2022 09:00:34 UTC
Date: Tue, 27 Dec 2022 08:41:52 -0000 (UTC)
X-Received-Bytes: 2401
 by: Jasen Betts - Tue, 27 Dec 2022 08:41 UTC

On 2022-12-25, John Larkin <jlarkin@highlandSNIPMEtechnology.com> wrote:
> On Sun, 25 Dec 2022 11:35:12 -0800 (PST), Lasse Langwadt Christensen
><langwadt@fonz.dk> wrote:
>
>>søndag den 25. december 2022 kl. 17.04.20 UTC+1 skrev John Larkin:
>>> Given a folder C:\Protos, I want a batch file to find all sub-folders,
>>> possibly a few levels deep, called OLD, and delete all of them. I
>>> can't make that work.
>>>
>>> When we develop a prototype PCB, we name iterations board1, board2,
>>> etc, and drag the old ones into an OLD folder until it's done. Spice
>>> folders get a OLD sub-folder too.
>>>
>>> Windows batch files don't make a lot of sense to me. Too many
>>> ambiguities.
>>>
>>> For example,
>>>
>>> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>>>
>>> is full of obsolete iterations.
>>
>>https://code.adonline.id.au/powershell-delete-folders-based-on-name/
>>
>>?
>
> Yikes. Maybe I'll just have someone do it.
>
> I could write a PowerBasic program, I guess.

maybe use a port of GNU find.
https://gnuwin32.sourceforge.net/packages/findutils.htm

"C:\path_to\find.exe C:\Protos -name OLD -type d -delete"
--
Jasen.

Re: Windows batch file help

<toed52$12is$1@gioia.aioe.org>

  copy mid

https://www.novabbs.com/tech/article-flat.php?id=113056&group=sci.electronics.design#113056

  copy link   Newsgroups: sci.electronics.design
Path: i2pn2.org!i2pn.org!aioe.org!VrG0gw/W73B+BsCN9s6Rhw.user.46.165.242.75.POSTED!not-for-mail
From: klausk...@hotmail.com (Klaus Vestergaard Kragelund)
Newsgroups: sci.electronics.design
Subject: Re: Windows batch file help
Date: Tue, 27 Dec 2022 10:16:19 +0100
Organization: Aioe.org NNTP Server
Message-ID: <toed52$12is$1@gioia.aioe.org>
References: <ifsgqhp406799vf7lse21fi8ep2ubgvh9b@4ax.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Info: gioia.aioe.org; logging-data="35420"; posting-host="VrG0gw/W73B+BsCN9s6Rhw.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101
Thunderbird/102.6.1
X-Notice: Filtered by postfilter v. 0.9.2
Content-Language: en-US
 by: Klaus Vestergaard Kr - Tue, 27 Dec 2022 09:16 UTC

On 25-12-2022 17:04, John Larkin wrote:
>
>
> Given a folder C:\Protos, I want a batch file to find all sub-folders,
> possibly a few levels deep, called OLD, and delete all of them. I
> can't make that work.
>
> When we develop a prototype PCB, we name iterations board1, board2,
> etc, and drag the old ones into an OLD folder until it's done. Spice
> folders get a OLD sub-folder too.
>
> Windows batch files don't make a lot of sense to me. Too many
> ambiguities.
>
> For example,
>
> C:\Protos\Z540_P940_Load_Board\PCB\OLD
>
> is full of obsolete iterations.
>
>
Use Total Commander. To a "Search", feed the results back to the active
window, Delete


tech / sci.electronics.design / Windows batch file help

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor