home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,546 of 42,547   
   me at to rednoise9@rednoise9.invalid   
   Re: Moving batch files to a Windows-11 l   
   20 Jan 26 14:53:45   
   
   From: my.address@is.invalid   
      
   My google research says it was dropped for security reasons. I am going to try   
   for a powershell script.   
      
   Thanks,   
      
      
   Mon, 19 Jan 2026 13:07:20 -0500 Nil  wrote:   
   | 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/ho   
   -to-install-wmic-feature-on-demand-on-windows-11/4189530   
   |   
   |   
   | On 19 Jan 2026, me at  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,   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca