Groups | Search | Server Info | Keyboard shortcuts | Login | Register
Groups > alt.msdos.batch > #6372
| From | Nil <rednoise9@rednoise9.invalid> |
|---|---|
| Newsgroups | alt.msdos.batch |
| Subject | Re: Moving batch files to a Windows-11 laptop. |
| Date | 2026-01-19 13:07 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <XnsB3D9857CF5F73nilch1@wheedledeedle.moc> (permalink) |
| References | <10klfbk$mk3$1@reader2.panix.com> |
wmic will still work in Windows 11, they just made it an optional
component that you can still add back. Here's how:
https://techcommunity.microsoft.com/blog/windows-itpro-blog/how-to-install-wmic-feature-on-demand-on-windows-11/4189530
On 19 Jan 2026, me at <my.address@is.invalid> wrote in
alt.msdos.batch:
> Good morning,
>
> Have updated to a new computer running windows 11.
> The following bat file will not work on it.
> Lots of googling, there is no longer wmic and that I must use
> powershell. Looking at many posts on stackoverflow.com I still
> dont get it. Please write me something I can put in a batch file.
>
> Sun 01/18/2026 10:14:23 C:\tmp >cpdas aaa.txt
>
> Sun 01/18/2026 10:14:23 C:\tmp >copy "aaa.txt"
> "C:\tmp\aaa-20260118-1014-23.txt"
> 1 file(s) copied.
> Sun 01/18/2026 10:14:23 C:\tmp >
>
> 8<--- old script
>
> @echo off
> for /f "tokens=2 delims==" %%I in ('wmic os get localdatetime
> /format:list') do set datetime=%%I set
> datetime=%datetime:~0,8%-%datetime:~8,4%-%datetime:~12,2% @echo
> on
>
> copy "%1" "%~dpn1-%datetime%%~x1"
>
> --->8
>
> Thanks,
Back to alt.msdos.batch | Previous | Next — Previous in thread | Next in thread | Find similar
Moving batch files to a Windows-11 laptop. me at <my.address@is.invalid> - 2026-01-19 14:33 +0000
Re: Moving batch files to a Windows-11 laptop. Nil <rednoise9@rednoise9.invalid> - 2026-01-19 13:07 -0500
Re: Moving batch files to a Windows-11 laptop. me at <my.address@is.invalid> - 2026-01-20 14:53 +0000
Re: Moving batch files to a Windows-11 laptop. Herbert Kleebauer <klee@unibwm.de> - 2026-01-20 16:22 +0100
Re: Moving batch files to a Windows-11 laptop. me at <my.address@is.invalid> - 2026-01-21 10:18 +0000
Re: Moving batch files to a Windows-11 laptop. Herbert Kleebauer <klee@unibwm.de> - 2026-01-21 13:19 +0100
Re: Moving batch files to a Windows-11 laptop. "Kerr-Mudd, John" <admin@127.0.0.1> - 2026-01-21 17:21 +0000
Re: Moving batch files to a Windows-11 laptop. me at <my.address@is.invalid> - 2026-01-22 14:21 +0000
Re: Moving batch files to a Windows-11 laptop. Robert Roland <fake@ddress.no> - 2026-02-02 08:48 +0100
csiph-web