Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

news: gotcha


devel / alt.msdos.batch / Re: [solved] Re: select the newest file in a folder

SubjectAuthor
* select the newest file in a folderAmmammata
`* [solved] Re: select the newest file in a folderAmmammata
 +- Re: [solved] Re: select the newest file in a folderFin Tres Nueve Dos
 `- Re: [solved] Re: select the newest file in a folderKerr-Mudd, John

1
select the newest file in a folder

<XnsAD37603B620A7ammammatatiscalineti@127.0.0.1>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=62&group=alt.msdos.batch#62

 copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: ammamm...@tiscalinet.it (Ammammata)
Newsgroups: alt.msdos.batch
Subject: select the newest file in a folder
Date: Thu, 27 May 2021 07:27:32 -0000 (UTC)
Message-ID: <XnsAD37603B620A7ammammatatiscalineti@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 27 May 2021 07:27:32 -0000 (UTC)
Injection-Info: solani.org;
logging-data="13144"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Xnews/??.01.30 Mime-proxy/2.3.c.1 (Win32)
X-User-ID: eJwFwQEBADAEBMBKDI84Y/SPsDsTMNoVBrW1LUhzI5fOSX11rTCZ0S1bGazeRFemnse5nlyar2ZQjiD3D1yfFac=
Cancel-Lock: sha1:9tOjghSdvwMvibZ37XKYrlXwAqY=
X-Face: s5/Tl9"^@"z`/]&NeE,Wl.^B~E2x9PA?1n:XZq2^T2Prz*},H~M'2.*@~v9MXx|OL8<EqC0MU$v+`Pu;`eq$N12\Nc*)cp$iBgD/wysO=)P%n6)\Xf}L\E$-0s\mD::Dx\6QwNh<U!LBH1Xj(=zy?OV.|=]We",DS\6[:
 by: Ammammata - Thu, 27 May 2021 07:27 UTC

I'd like to locate the newest file in a backup folder (through a network
path like \\192.168.1.4\backup\server\data), to copy it locally and manage,
packing and sending to a remote FTP

file names are increasing (like yyyymmdd-hhmmss), so if I sort the content,
the newest could be the first or the last

I'd like to do this without too many external tools, using just a packer
like 7zip (or the internal ZIP command available in explorer)

the task will run on windows, version 7, until the pc will be upgraded to
10

thank you

--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
............ [ al lavoro ] ...........

[solved] Re: select the newest file in a folder

<XnsAD3761617B2B1ammammatatiscalineti@127.0.0.1>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=63&group=alt.msdos.batch#63

 copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!feeder5.news.weretis.net!news.solani.org!.POSTED!not-for-mail
From: ammamm...@tiscalinet.it (Ammammata)
Newsgroups: alt.msdos.batch
Subject: [solved] Re: select the newest file in a folder
Date: Thu, 27 May 2021 07:34:19 -0000 (UTC)
Message-ID: <XnsAD3761617B2B1ammammatatiscalineti@127.0.0.1>
References: <XnsAD37603B620A7ammammatatiscalineti@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 27 May 2021 07:34:19 -0000 (UTC)
Injection-Info: solani.org;
logging-data="13144"; mail-complaints-to="abuse@news.solani.org"
User-Agent: Xnews/??.01.30 Mime-proxy/2.3.c.1 (Win32)
X-Face: s5/Tl9"^@"z`/]&NeE,Wl.^B~E2x9PA?1n:XZq2^T2Prz*},H~M'2.*@~v9MXx|OL8<EqC0MU$v+`Pu;`eq$N12\Nc*)cp$iBgD/wysO=)P%n6)\Xf}L\E$-0s\mD::Dx\6QwNh<U!LBH1Xj(=zy?OV.|=]We",DS\6[:
Cancel-Lock: sha1:VQ/bFm2U8iOdj/fxtn2tp/9VnIk=
X-User-ID: eJwNyckBwDAIA7CVuEyacQqG/Udo9RU8NftEIgOLXafpFkIWE4c1GHv+oV5hvmXF23InJAZa7SZd0+IsUp8PbN4Waw==
 by: Ammammata - Thu, 27 May 2021 07:34 UTC

Il giorno Thu 27 May 2021 09:27:32a, *Ammammata* ha inviato su
alt.msdos.batch il messaggio
news:XnsAD37603B620A7ammammatatiscalineti@127.0.0.1. Vediamo cosa ha
scritto:

> I'd like to locate the newest file in a folder

I reply to myself :/

for /f %%i in ('dir /b/a-d/od/t:c') do set LAST=%%i
echo The most recently created file is %LAST%

--
/-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
-=- -=- -=- -=- -=- -=- -=- -=- - -=-
............ [ al lavoro ] ...........

Re: [solved] Re: select the newest file in a folder

<8aadfdde-2887-45c1-8699-bf2450970186n@googlegroups.com>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=64&group=alt.msdos.batch#64

 copy link   Newsgroups: alt.msdos.batch
X-Received: by 2002:ae9:e71a:: with SMTP id m26mr2217086qka.36.1622180467361;
Thu, 27 May 2021 22:41:07 -0700 (PDT)
X-Received: by 2002:a05:620a:c84:: with SMTP id q4mr2286515qki.220.1622180467153;
Thu, 27 May 2021 22:41:07 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: alt.msdos.batch
Date: Thu, 27 May 2021 22:41:06 -0700 (PDT)
In-Reply-To: <XnsAD3761617B2B1ammammatatiscalineti@127.0.0.1>
Injection-Info: google-groups.googlegroups.com; posting-host=83.50.102.90; posting-account=q0M-9QoAAABSRxocdLVRiCyzwDEYGxmv
NNTP-Posting-Host: 83.50.102.90
References: <XnsAD37603B620A7ammammatatiscalineti@127.0.0.1> <XnsAD3761617B2B1ammammatatiscalineti@127.0.0.1>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <8aadfdde-2887-45c1-8699-bf2450970186n@googlegroups.com>
Subject: Re: [solved] Re: select the newest file in a folder
From: fin...@gmail.com (Fin Tres Nueve Dos)
Injection-Date: Fri, 28 May 2021 05:41:07 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: Fin Tres Nueve Dos - Fri, 28 May 2021 05:41 UTC

El jueves, 27 de mayo de 2021 a las 9:34:21 UTC+2, Ammammata escribió:
> Il giorno Thu 27 May 2021 09:27:32a, *Ammammata* ha inviato su
> alt.msdos.batch il messaggio
> news:XnsAD37603B620A7am...@127.0.0.1. Vediamo cosa ha
> scritto:
>
> > I'd like to locate the newest file in a folder
>
> I reply to myself :/
>
> for /f %%i in ('dir /b/a-d/od/t:c') do set LAST=%%i
> echo The most recently created file is %LAST%
> --
> /-\ /\/\ /\/\ /-\ /\/\ /\/\ /-\ T /-\
> -=- -=- -=- -=- -=- -=- -=- -=- - -=-
> ........... [ al lavoro ] ...........

for /f "tokens=*" %a in ('dir "\\192.168.1.4\backup\server\data\*.*" /b /o-d') do @set LastFile=%~fa

echo %LastFile%

Re: [solved] Re: select the newest file in a folder

<20210528115638.5e90a9be40c1fa8bd759a653@127.0.0.1>

 copy mid

https://www.novabbs.com/devel/article-flat.php?id=65&group=alt.msdos.batch#65

 copy link   Newsgroups: alt.msdos.batch
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: adm...@127.0.0.1 (Kerr-Mudd, John)
Newsgroups: alt.msdos.batch
Subject: Re: [solved] Re: select the newest file in a folder
Date: Fri, 28 May 2021 11:56:38 +0100
Organization: Dis
Lines: 19
Message-ID: <20210528115638.5e90a9be40c1fa8bd759a653@127.0.0.1>
References: <XnsAD37603B620A7ammammatatiscalineti@127.0.0.1>
<XnsAD3761617B2B1ammammatatiscalineti@127.0.0.1>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: reader02.eternal-september.org; posting-host="84e37c5f9b99efe477c865c43477f1fd";
logging-data="11280"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX185jFK9Tmgk34UDp/XrO0MO46NkZZIRRB4="
Cancel-Lock: sha1:oV9RmJnNeEij3z/GVZxeurCpNtU=
X-Newsreader: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32)
X-no-Archive: Maybe
 by: Kerr-Mudd, John - Fri, 28 May 2021 10:56 UTC

On Thu, 27 May 2021 07:34:19 -0000 (UTC)
Ammammata <ammammata@tiscalinet.it> wrote:

> Il giorno Thu 27 May 2021 09:27:32a, *Ammammata* ha inviato su
> alt.msdos.batch il messaggio
> news:XnsAD37603B620A7ammammatatiscalineti@127.0.0.1. Vediamo cosa ha
> scritto:
>
> > I'd like to locate the newest file in a folder
>
> I reply to myself :/
>
> for /f %%i in ('dir /b/a-d/od/t:c') do set LAST=%%i
> echo The most recently created file is %LAST%
>
Often the best way to solve a problem is to clearly express the problem as a question!

--
Bah, and indeed Humbug.

1
server_pubkey.txt

rocksolid light 0.9.7
clearnet tor