Search found 590 matches
- 17 Aug 2021 09:43
- Forum: DOS Batch Forum
- Topic: DOS batch file or something else?
- Replies: 2
- Views: 3499
Re: DOS batch file or something else?
You need to provide more details, including, but not limited to: Are we to assume that there will only ever be files with the .RAW and .JPG extensions in that directory? Will there ever be files with a .RAW or .JPG extension which does not have a matching extension of the other type? You are after a...
- 29 May 2021 16:50
- Forum: DOS Batch Forum
- Topic: Need help
- Replies: 24
- Views: 12742
Re: Need help
Or perhaps just this in the Command Prompt:Which should list the full filename, the line number, and then the line containing the case insensitive string Echo of every .bat file on the Z: drive.
Code: Select all
%__AppDir__%findstr.exe /IS "Echo" Z:\*.bat
- 27 Apr 2021 10:10
- Forum: DOS Batch Forum
- Topic: Taskkill %0
- Replies: 6
- Views: 5151
Re: Taskkill %0
TASKKILL /F /FI "WINDOWTITLE EQ "%0"" would work if the i would not add "- file1" and so on. But if I add * to this command it doesn't work: TASKKILL /F /FI "WINDOWTITLE EQ "%0" *" Where is my mistake or does it not work this way? Untested, but have you tried including the wildcard within the doubl...
- 20 Apr 2021 07:42
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10777
Re: Windows (and Office?) product key finder
My script runs correctly in Windows 10. Okay, let me put this to you in a different way; your script does not work correctly in Windows 10 x64, if it is run in a 32-bit cmd.exe instance. It only works correctly in a 64-bit cmd.exe instance, on a Windows x64 OS, and a 32-bit cmd.exe instance on a Wi...
- 19 Apr 2021 17:38
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10777
Re: Windows (and Office?) product key finder
There were a couple of tricky things here: <snip /> <snip /> if "%processor_architecture%"=="AMD64" set "reg_value=%reg_value%4" set "reg_query=reg query "%reg_key%" /v %reg_value%" for /f "tokens=3" %%A in ('%reg_query%') do set "key=%%A" <snip /> I'd advise that you take account of my previous po...
- 19 Apr 2021 08:17
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10777
Re: Windows (and Office?) product key finder
What is strange is that PROCESSOR_ARCHITECTURE=x86 but it really is 64-bit computer. And Shadow tests if "%processor_architecture%"=="AMD64" but SET P shows PROCESSOR_ARCHITECTURE=x86 PROCESSOR_ARCHITEW6432=AMD64 So maybe PROCESSOR_ARCHITEW6432 should be tested and not PROCESSOR_ARCHITECTURE (I don...
- 19 Apr 2021 04:56
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10777
Re: Windows (and Office?) product key finder
Compo's version works. I will check both of them on XP later today. Just to clarify my body text: Here's an example, now tested successfully only on Windows 2000, and Windows 10 x64 in both 32-bit and 64-bit modes) <snip /> The only thing, I'm unsure about is whether the Windows XP x64, version of ...
- 17 Apr 2021 14:01
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10777
Re: Windows (and Office?) product key finder
Here's an example, now tested successfully only on Windows 2000, and Windows 10 x64 in both 32-bit and 64-bit modes) @Echo Off SetLocal EnableExtensions EnableDelayedExpansion Set "sKey=HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" Set PROCESSOR_ARCHITE | %SystemRoot%\System32\find.exe "64" 1>N...
- 16 Apr 2021 07:22
- Forum: DOS Batch Forum
- Topic: Set Colum for every file to txt [SOLVED]
- Replies: 3
- Views: 3171
Re: Set Colum for every file to txt
Ignoring the 'maxbytesize', which seems to be unused, perhaps something like this is what you want: @Echo Off SetLocal EnableExtensions DisableDelayedExpansion Set "i=0" ( For /F "EOL=? Delims=" %%G In ('Dir /B /A:-D 2^>NUL') Do ( Set /A i += 1, # = %%~zG SetLocal EnableDelayedExpansion For /F "Toke...
- 14 Apr 2021 12:08
- Forum: DOS Batch Forum
- Topic: Clobbered cmd.exe!
- Replies: 7
- Views: 10942
Re: Clobbered cmd.exe!
I'm sorry IcarusLives, but I clearly read the opening post, where it was stated that there was a copy of cmd.exe in the x86 application location, \SysWOW64.
Both sfc.exe and dism.exe also have x86 versions in \SysWOW64, hence my advice.
- 12 Apr 2021 19:05
- Forum: DOS Batch Forum
- Topic: Clobbered cmd.exe!
- Replies: 7
- Views: 10942
Re: Clobbered cmd.exe!
Have you tries the basics, as administrator, before resorting to a System Restore?
Code: Select all
sfc.exe /ScanNow
Code: Select all
Dism.exe /Online /Cleanup-Image /CheckHealth
Code: Select all
Dism.exe /Online /Cleanup-Image /ScanHealth
Code: Select all
Dism.exe /Online /Cleanup-Image /RestoreHealth
- 12 Apr 2021 18:51
- Forum: DOS Batch Forum
- Topic: Windows (and Office?) product key finder
- Replies: 13
- Views: 10777
Re: Windows (and Office?) product key finder
If you want one of those two to assist you, send them a personal message, instead of telling everyone else that you feel they have less worth to you, and demotivating them.
- 31 Mar 2021 09:41
- Forum: DOS Batch Forum
- Topic: How do I convert batch script arguments to pattern?
- Replies: 6
- Views: 5897
Re: How do I convert batch script arguments to pattern?
Please don't try to disrespect me, I was very clear in my opening statement of my last response. You've completely changed your input to include both spaces and doublequotes, and would obviously not therefore, be splitting the string on spaces, would you? You'd be splitting on a doublequote space do...
- 31 Mar 2021 08:26
- Forum: DOS Batch Forum
- Topic: How do I convert batch script arguments to pattern?
- Replies: 6
- Views: 5897
Re: How do I convert batch script arguments to pattern?
If your input files are all unquoted, and do not contain spaces or other potentially poison characters, then you could probably simply use something like this:
Code: Select all
@Set "allinput=%*"
@Echo -ai!%allinput: = -ai!%
- 31 Mar 2021 08:17
- Forum: DOS Batch Forum
- Topic: read sfc output
- Replies: 4
- Views: 5074
Re: read sfc output
There's some interesting observations made in the following StackOverflow post, which may potentially assist you.