By registering with us, you'll be able to discuss, share and exchange private messages with other members of our community.
SignUp Now!@setlocal
@echo off
COMMENT
_x64: 1
_admin: 1
_elevated: 1
TCC 30.00.22 x64 Windows 10 [Version 10.0.19044.3086]
ENDCOMMENT
setarray /f info[10,2]
set info[0,0]=CompanyName
set info[1,0]=FileDescription
set info[2,0]=FileVersion
set info[3,0]=InternalName
set info[4,0]=LegalCopyright
set info[5,0]=LegalTrademarks
set info[6,0]=OriginalFileName
set info[7,0]=ProductName
set info[8,0]=ProductVersion
set info[9,0]=Build
set target="C:\Program Files\JPSoft\TCMD30\tcc.exe"
do kount=0 to 9
set info[%kount,1]=%@verinfo[%target,%info[%kount,0]]
echo %info[%kount,0] %@char[9] %info[%kount,1]
enddo
unsetarray info
endlocal
if %# eq 0 set target="C:\Program Files\JPSoft\TCMD30\tcc.exe"
if %# eq 1 set target=%1
do kount=0 to 9
set info[%kount,1]=%@verinfo[%target,%info[%kount,0]]
set f1Len=%@len[%info[%kount,0]]
echos %info[%kount,0]
printf %*s\n, %@eval[70-%f1Len], %info[%kount,1]
enddo
Here is one method, that populates an array with the information.
Code:@setlocal @echo off COMMENT _x64: 1 _admin: 1 _elevated: 1 TCC 30.00.22 x64 Windows 10 [Version 10.0.19044.3086] ENDCOMMENT setarray /f info[10,2] set info[0,0]=CompanyName set info[1,0]=FileDescription set info[2,0]=FileVersion set info[3,0]=InternalName set info[4,0]=LegalCopyright set info[5,0]=LegalTrademarks set info[6,0]=OriginalFileName set info[7,0]=ProductName set info[8,0]=ProductVersion set info[9,0]=Build set target="C:\Program Files\JPSoft\TCMD30\tcc.exe" do kount=0 to 9 set info[%kount,1]=%@verinfo[%target,%info[%kount,0]] echo %info[%kount,0] %@char[9] %info[%kount,1] enddo unsetarray info endlocal
Joe
E:\Utils>allinfo.btm
CompanyName JP Software
FileDescription TCC
FileVersion 30.0.22
InternalName TCC
LegalCopyright Copyright (c) 2023 Rex C. Conn and JP Software Inc.
LegalTrademarks Take Command is a trademark of JP Software Inc.
OriginalFileName TCC
ProductName TCC
ProductVersion 30.0.22
Build 22
either
for %fn in (*.exe) if "%@verinfo[%fn,ProductName]" NE "" move /r "%fn" "test\%@replace[ ,_,%@verinfo[%fn,ProductName]_%@verinfo[%fn,ProductVersion]_%@verinfo[%fn,FileVersion].%@ext[%fn]]"
or
for %fn in (*.exe) if "%@verinfo[%fn,FileDescription]" NE "" move /r "%fn" "test\%@replace[ ,_,%@verinfo[%fn,FileDescription].%@ext[%fn]]"
then
move /d /r Test\* .
while there is a "__" in the EXE name
for %fn in (*.exe) move /r "%fn" "test\%@replace[__,_,%fn]"
move /d /r Test\* .
enddo
C:\>echo %@verinfo[c:\Bin\JPSDK\FileUtils\x64\Release\FileUtils.dll,Build]
2023-08-13 18:08:09
C:\>echo %@verinfo[c:\Bin\JPSDK\FileUtils\x64\Release\FileUtils.dll,"Built On"]
COE-LN00061392
C:\>
Dim Shell
Dim ShellFolder
Dim ShellFile
Set Shell = CreateObject("Shell.Application")
'Set ShellFolder = Shell.NameSpace("C:\Program Files\JPSoft\TCMD30\")
'Set ShellFile = ShellFolder.ParseName("tcc.exe")
Set ShellFolder = Shell.NameSpace("E:\Utils\")
Set ShellFile = ShellFolder.ParseName("TakeCommand.pdf")
For kount=0 To 320
WScript.Echo kount, ShellFolder.GetDetailsOf(ShellFolder.Items, kount), " - ", ShellFolder.GetDetailsOf(ShellFile, kount)
Next
Set ShellFolder = Nothing
Set ShellFile = Nothing
Set Shell = Nothing
cscript //nologo props.vbs
xInfo[field]
For kount=0 To 1024
If LenB(ShellFolder.GetDetailsOf(ShellFile, kount)) > 0 Then
WScript.Echo kount, ShellFolder.GetDetailsOf(ShellFolder.Items, kount), " - ", ShellFolder.GetDetailsOf(ShellFile, kount)
End If
Next
Microsoft (R) Windows Script Host Version 5.812
Copyright (C) Microsoft Corporation. All rights reserved.
0 Name - tcc.exe
1 Size - 257 KB
2 Item type - Application
3 Date modified - 2023-06-19 1:03 PM
4 Date created - 2023-06-19 1:03 PM
5 Date accessed - 2023-09-05 11:27 AM
6 Attributes - A
9 Perceived type - Application
10 Owner - SYSTEM
11 Kind - Program
19 Rating - Unrated
25 Copyright - Copyright (c) 2023 Rex C. Conn and JP Software Inc.
33 Company - JP Software
34 File description - TCC
57 Total size - 465 GB
61 Computer - DESKTOP-LFBF7P3 (this PC)
164 File extension - .exe
165 Filename - tcc.exe
166 File version - 30.0.22.0
169 Space free - 281 GB
187 Shared - No
190 Folder name - TCMD30
191 Folder path - C:\Program Files\JPSoft\TCMD30
192 Folder - TCMD30 (C:\Program Files\JPSoft)
194 Path - C:\Program Files\JPSoft\TCMD30\tcc.exe
196 Type - Application
199 Language - English (United States)
202 Link status - Unresolved
254 Space used - ?39%
295 Sharing status - Not shared
296 - Available
297 Product name - TCC
298 Product version - 30.0.22
310 Legal trademarks - Take Command is a trademark of JP Software Inc.
@setlocal
@echo off
iff not plugin ActiveScript then
echo ActiveScript Plugin is required.
quit
endiff
iff not isplugin VerInfoEx then
echo The ActiveScript plugin does not contain the VerInfoEx command.
plugin /i ActiveScript
quit
endiff
iff %# eq 2 then
set VerInfoEx=%{verinfoex %1,%2}
echo Arg1=%1
echo Arg2=%2
else
set VerInfoEx=%{verinfoex %_cmdspec,310}
endiff
echo %VerInfoEx
set theAttribute=%@word[":",0,%VerInfoEx]
set theFile=%@word[":",1,%VerInfoEx]
set theResult=%@word[":",2,%VerInfoEx]
echo.
echo The Attribute: %theAttribute
echo The File: %theFile
echo The Result: %theResult
endlocal
E:\...\plugin>verinfoex.btm %_cmdspec,310
310:Legal trademarks:Take Command is a trademark of JP Software Inc.
The Attribute: 310
The File: Legal trademarks
The Result: Take Command is a trademark of JP Software Inc.
R:\>verinfoex %_cwd\readme.txt,1
1:Size:2.22 KB
Hi @Charles G;
Please find attached the updated ActiveScript plugin,
which contains the VerInfoEx command.
The VerInfoEx command is not finished,
but it allows one to provide a file and an attribute on the command line,
and returns the value of the attribute.
Note that VerInfoEx will work with any file,
not just .EXE files.
Example;
Code:@setlocal @echo off iff not plugin ActiveScript then echo ActiveScript Plugin is required. quit endiff iff not isplugin VerInfoEx then echo The ActiveScript plugin does not contain the VerInfoEx command. plugin /i ActiveScript quit endiff iff %# eq 2 then set VerInfoEx=%{verinfoex %1,%2} echo Arg1=%1 echo Arg2=%2 else set VerInfoEx=%{verinfoex %_cmdspec,310} endiff echo %VerInfoEx set theAttribute=%@word[":",0,%VerInfoEx] set theFile=%@word[":",1,%VerInfoEx] set theResult=%@word[":",2,%VerInfoEx] echo. echo The Attribute: %theAttribute echo The File: %theFile echo The Result: %theResult endlocal
Sample run;
Code:E:\...\plugin>verinfoex.btm %_cmdspec,310 310:Legal trademarks:Take Command is a trademark of JP Software Inc. The Attribute: 310 The File: Legal trademarks The Result: Take Command is a trademark of JP Software Inc.
Please feel free to run some tests with the VerInfoEx command,
and see if it returns the info you need.
Joe
EDIT: Note that the file name must include the complete path,
even if you are in the folder where the file resides.
Example: If I am in the R:\ folder, and it contains the file readme.txt,
Code:R:\>verinfoex %_cwd\readme.txt,1 1:Size:2.22 KB
E:\...\Twitter>verinfoex %_cwd\20230113_180817.jpg,9
9:Perceived type: Image
verinfoex %_cwd\Register2022.xlsm,9
9:Perceived type: Document
verinfoex %_cwd\Lana Del Rey - Doin’ Time (Official Video).mp4,9
9:Perceived type: Video
verinfoex %_cwd\TRNSCTNS.DBF,9
9:Perceived type: Unspecified
verinfoex %_cwd\gotmail.mp3,9
9:Perceived type: Audio
0 Name
1 Size
2 Item type
3 Date modified
4 Date created
5 Date accessed
6 Attributes
7 Offline status
8 Availability
9 Perceived type
10 Owner
11 Kind
12 Date taken
13 Contributing artists
14 Album
15 Year
16 Genre
17 Conductors
18 Tags
19 Rating
20 Authors
21 Title
22 Subject
23 Categories
24 Comments
25 Copyright
26 #
27 Length
28 Bit rate
29 Protected
30 Camera model
31 Dimensions
32 Camera maker
33 Company
34 File description
35 Masters keywords
36 Masters keywords
42 Program name
43 Duration
44 Is online
45 Is recurring
46 Location
47 Optional attendee addresses
48 Optional attendees
49 Organizer address
50 Organizer name
51 Reminder time
52 Required attendee addresses
53 Required attendees
54 Resources
55 Meeting status
56 Free/busy status
57 Total size
58 Account name
60 Task status
61 Computer
62 Anniversary
63 Assistant's name
64 Assistant's phone
65 Birthday
66 Business address
67 Business city
68 Business country/region
69 Business P.O. box
70 Business postal code
71 Business state or province
72 Business street
73 Business fax
74 Business home page
75 Business phone
76 Callback number
77 Car phone
78 Children
79 Company main phone
80 Department
81 E-mail address
82 E-mail2
83 E-mail3
84 E-mail list
85 E-mail display name
86 File as
87 First name
88 Full name
89 Gender
90 Given name
91 Hobbies
92 Home address
93 Home city
94 Home country/region
95 Home P.O. box
96 Home postal code
97 Home state or province
98 Home street
99 Home fax
100 Home phone
101 IM addresses
102 Initials
103 Job title
104 Label
105 Last name
106 Mailing address
107 Middle name
108 Cell phone
109 Nickname
110 Office location
111 Other address
112 Other city
113 Other country/region
114 Other P.O. box
115 Other postal code
116 Other state or province
117 Other street
118 Pager
119 Personal title
120 City
121 Country/region
122 P.O. box
123 Postal code
124 State or province
125 Street
126 Primary e-mail
127 Primary phone
128 Profession
129 Spouse/Partner
130 Suffix
131 TTY/TTD phone
132 Telex
133 Webpage
134 Content status
135 Content type
136 Date acquired
137 Date archived
138 Date completed
139 Device category
140 Connected
141 Discovery method
142 Friendly name
143 Local computer
144 Manufacturer
145 Model
146 Paired
147 Classification
148 Status
149 Status
150 Client ID
151 Contributors
152 Content created
153 Last printed
154 Date last saved
155 Division
156 Document ID
157 Pages
158 Slides
159 Total editing time
160 Word count
161 Due date
162 End date
163 File count
164 File extension
165 Filename
166 File version
167 Flag color
168 Flag status
169 Space free
172 Group
173 Sharing type
174 Bit depth
175 Horizontal resolution
176 Width
177 Vertical resolution
178 Height
179 Importance
180 Is attachment
181 Is deleted
182 Encryption status
183 Has flag
184 Is completed
185 Incomplete
186 Read status
187 Shared
188 Creators
189 Date
190 Folder name
191 Folder path
192 Folder
193 Participants
194 Path
195 By location
196 Type
197 Contact names
198 Entry type
199 Language
200 Date visited
201 Description
202 Link status
203 Link target
204 URL
208 Media created
209 Date released
210 Encoded by
211 Episode number
212 Producers
213 Publisher
214 Season number
215 Subtitle
216 User web URL
217 Writers
219 Attachments
220 Bcc addresses
221 Bcc
222 Cc addresses
223 Cc
224 Conversation ID
225 Date received
226 Date sent
227 From addresses
228 From
229 Has attachments
230 Sender address
231 Sender name
232 Store
233 To addresses
234 To do title
235 To
236 Mileage
237 Album artist
238 Sort album artist
239 Album ID
240 Sort album
241 Sort contributing artists
242 Beats-per-minute
243 Composers
244 Sort composer
245 Disc
246 Initial key
247 Part of a compilation
248 Mood
249 Part of set
250 Period
251 Color
252 Parental rating
253 Parental rating reason
254 Space used
255 EXIF version
256 Event
257 Exposure bias
258 Exposure program
259 Exposure time
260 F-stop
261 Flash mode
262 Focal length
263 35mm focal length
264 ISO speed
265 Lens maker
266 Lens model
267 Light source
268 Max aperture
269 Metering mode
270 Orientation
271 People
272 Program mode
273 Saturation
274 Subject distance
275 White balance
276 Priority
277 Project
278 Channel number
279 Episode name
280 Closed captioning
281 Rerun
282 SAP
283 Broadcast date
284 Program description
285 Recording time
286 Station call sign
287 Station name
288 Summary
289 Snippets
290 Auto summary
291 Relevance
292 File ownership
293 Sensitivity
294 Shared with
295 Sharing status
297 Product name
298 Product version
299 Support link
300 Source
301 Start date
302 Sharing
303 Availability status
304 Status
305 Billing information
306 Complete
307 Task owner
308 Sort title
309 Total file size
310 Legal trademarks
311 Video compression
312 Directors
313 Data rate
314 Frame height
315 Frame rate
316 Frame width
317 Spherical
318 Stereo
319 Video orientation
320 Total bitrate
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\KindMap /s |! ffields
HKEY_LOCAL_MACHINE
.3ds REG_SZ picture
.3fr REG_SZ picture
.3g2 REG_SZ video
.3gp REG_SZ video
.3gp2 REG_SZ video
.3gpp REG_SZ video
.a11 REG_SZ picture
.aac REG_SZ music
.accountpicture-ms REG_SZ picture
.ade REG_SZ document
.adp REG_SZ document
.adts REG_SZ music
.ai REG_SZ picture
.aif REG_SZ music
.aifc REG_SZ music
.aiff REG_SZ music
.amf REG_SZ music
.amr REG_SZ music
.ani REG_SZ picture
.anm REG_SZ picture
.ari REG_SZ picture
.art REG_SZ picture
.arw REG_SZ picture
.asf REG_SZ video
.ass REG_SZ video
.asx REG_SZ video
.au REG_SZ music
.avci REG_SZ picture
.avcs REG_SZ picture
.avi REG_SZ video
.avif REG_SZ picture
.avifs REG_SZ picture
.avm REG_SZ video
.awm REG_SZ video
.b&w REG_SZ picture
.b1n REG_SZ picture
.b8 REG_SZ picture
.b_w REG_SZ picture
.bat REG_SZ program
.bay REG_SZ picture
.bga REG_SZ picture
.bit REG_SZ picture
.bld REG_SZ picture
.bm REG_SZ picture
.bmp REG_SZ picture
.cap REG_SZ picture
.cda REG_SZ music
.cdf REG_SZ picture
.cdr REG_SZ picture
.cgm REG_SZ picture
.cmd REG_SZ program
.cmp REG_SZ picture
.cmv REG_SZ video
.com REG_SZ program
.contact REG_SZ contact;communication
.cps REG_SZ picture
.cr2 REG_SZ picture
.cr3 REG_SZ picture
.crw REG_SZ picture
.csv REG_SZ document
.cvs REG_SZ picture
.dcr REG_SZ picture
.dcs REG_SZ picture
.dcx REG_SZ picture
.dfs REG_SZ music
.dib REG_SZ picture
.dip REG_SZ picture
.dkb REG_SZ picture
.dng REG_SZ picture
.doc REG_SZ document
.dot REG_SZ document
.drf REG_SZ picture
.dss REG_SZ music
.dvi REG_SZ document
.dvr-ms REG_SZ recordedtv
.dw2 REG_SZ picture
.dwg REG_SZ picture
.eip REG_SZ picture
.emf REG_SZ picture
.eml REG_SZ email;communication
.eps REG_SZ picture
.erf REG_SZ picture
.exe REG_SZ program
.far REG_SZ music
.fff REG_SZ picture
.fh3 REG_SZ picture
.fh4 REG_SZ picture
.fit REG_SZ picture
.flac REG_SZ music
.flc REG_SZ picture
.fli REG_SZ picture
.gcd REG_SZ picture
.gif REG_SZ picture
.gl REG_SZ picture
.group REG_SZ contact
.gsd REG_SZ picture
.heic REG_SZ picture
.heics REG_SZ picture
.heif REG_SZ picture
.heifs REG_SZ picture
.hif REG_SZ picture
.hrf REG_SZ picture
.hs2 REG_SZ picture
.hsi REG_SZ picture
.hta REG_SZ program
.htm REG_SZ document
.html REG_SZ document
.iax REG_SZ picture
.ica REG_SZ picture
.icb REG_SZ picture
.ico REG_SZ picture
.ics REG_SZ calendar;communication
.idx REG_SZ video
.iiq REG_SZ picture
.ivf REG_SZ video
.jas REG_SZ picture
.jff REG_SZ picture
.jfif REG_SZ picture
.jif REG_SZ picture
.jnt REG_SZ document
.jpc REG_SZ picture
.jpe REG_SZ picture
.jpeg REG_SZ picture
.jpg REG_SZ picture
.jtf REG_SZ picture
.jxr REG_SZ picture
.k25 REG_SZ picture
.kdc REG_SZ picture
.latex REG_SZ document
.lbm REG_SZ picture
.lnk REG_SZ link
.m1v REG_SZ video
.m2t REG_SZ video
.m2ts REG_SZ video
.m3u REG_SZ music;playlist
.m4a REG_SZ music
.m4p REG_SZ music
.m4v REG_SZ video
.mdb REG_SZ document
.mde REG_SZ document
.mef REG_SZ picture
.mht REG_SZ document
.mhtml REG_SZ document
.mid REG_SZ music
.midi REG_SZ music
.mk3d REG_SZ video
.mka REG_SZ music
.mkv REG_SZ video
.mmm REG_SZ video
.mny REG_SZ document
.mos REG_SZ picture
.mov REG_SZ video
.mp2 REG_SZ music
.mp2v REG_SZ video
.mp3 REG_SZ music
.mp4 REG_SZ video
.mp4v REG_SZ video
.mpa REG_SZ video
.mpc REG_SZ document
.mpd REG_SZ document
.mpe REG_SZ video
.mpeg REG_SZ video
.mpg REG_SZ video
.mpp REG_SZ document
.mpt REG_SZ picture
.mpv2 REG_SZ video
.mpx REG_SZ document
.mrw REG_SZ picture
.msg REG_SZ email;communication
.msi REG_SZ program
.msp REG_SZ program
.mts REG_SZ video
.mus REG_SZ music
.mwf REG_SZ video
.nc REG_SZ picture
.nef REG_SZ picture
.neo REG_SZ picture
.nrw REG_SZ picture
.nws REG_SZ email;communication
.okt REG_SZ music
.one REG_SZ document
.orf REG_SZ picture
.ori REG_SZ picture
.p16 REG_SZ music
.pct REG_SZ picture
.pcx REG_SZ picture
.pda REG_SZ picture
.pdd REG_SZ picture
.pdf REG_SZ document
.pds REG_SZ picture
.pef REG_SZ picture
.pgm REG_SZ picture
.pic REG_SZ picture
.pif REG_SZ program
.pix REG_SZ picture
.pm REG_SZ document
.pm5 REG_SZ document
.png REG_SZ picture
.pot REG_SZ document
.ppm REG_SZ picture
.pps REG_SZ document
.ppt REG_SZ document
.ppz REG_SZ document
.ps REG_SZ document
.psd REG_SZ picture
.pse REG_SZ picture
.psm REG_SZ music
.pt5 REG_SZ document
.ptx REG_SZ picture
.pxn REG_SZ picture
.qdv REG_SZ picture
.qt REG_SZ video
.ra REG_SZ music
.raf REG_SZ picture
.ram REG_SZ music
.raw REG_SZ picture
.reg REG_SZ program
.rgb REG_SZ picture
.rif REG_SZ picture
.rip REG_SZ picture
.rix REG_SZ picture
.rl4 REG_SZ picture
.rl8 REG_SZ picture
.rle REG_SZ picture
.rmi REG_SZ music
.rtf REG_SZ document
.rtx REG_SZ document
.rw2 REG_SZ picture
.rwl REG_SZ picture
.s3m REG_SZ music
.scr REG_SZ program
.search-ms REG_SZ searchfolder
.sg1 REG_SZ picture
.snd REG_SZ music
.sng REG_SZ music
.sr2 REG_SZ picture
.srf REG_SZ picture
.srt REG_SZ video
.srw REG_SZ picture
.ssa REG_SZ video
.stm REG_SZ music
.sub REG_SZ video
.tex REG_SZ document
.text REG_SZ document
.tif REG_SZ picture
.tiff REG_SZ picture
.ts REG_SZ video
.tsv REG_SZ document
.ttml REG_SZ video
.tts REG_SZ video
.txt REG_SZ document
.ult REG_SZ music
.url REG_SZ link
.uw REG_SZ music
.van REG_SZ picture
.vbe REG_SZ program
.vbs REG_SZ program
.vbx REG_SZ program
.vcard REG_SZ contact;communication
.vcf REG_SZ contact;communication
.vcs REG_SZ calendar;communication
.vda REG_SZ picture
.vdr REG_SZ picture
.vdx REG_SZ document
.voc REG_SZ music
.vsd REG_SZ document
.vsl REG_SZ document
.vss REG_SZ document
.vst REG_SZ document
.vsw REG_SZ document
.vsx REG_SZ document
.vtt REG_SZ video
.vtx REG_SZ document
.vue REG_SZ video
.wav REG_SZ music
.wax REG_SZ music
.wdp REG_SZ picture
.webp REG_SZ picture
.wks REG_SZ document
.wm REG_SZ video
.wma REG_SZ music
.wmf REG_SZ picture
.wmv REG_SZ video
.wmx REG_SZ video
.wp REG_SZ document
.wp5 REG_SZ document
.wp6 REG_SZ document
.wpd REG_SZ document
.wpl REG_SZ music;playlist
.wri REG_SZ document
.wtx REG_SZ document
.wvx REG_SZ video
.x3f REG_SZ picture
.xbm REG_SZ picture
.xif REG_SZ picture
.xlb REG_SZ document
.xlc REG_SZ document
.xll REG_SZ document
.xlm REG_SZ document
.xls REG_SZ document
.xlw REG_SZ document
.xm REG_SZ music
.xmi REG_SZ music
.xml REG_SZ document
.xpm REG_SZ picture
.zpl REG_SZ music;playlist
.docx REG_SZ Document
.docm REG_SZ Document
.dotx REG_SZ Document
.dotm REG_SZ Document
.odt REG_SZ Document
.pptx REG_SZ Document
.ppsx REG_SZ Document
.pptm REG_SZ Document
.ppsm REG_SZ Document
.potx REG_SZ Document
.potm REG_SZ Document
.sldx REG_SZ Document
.sldm REG_SZ Document
.odp REG_SZ Document
.xltx REG_SZ Document
.xltm REG_SZ Document
.xlsx REG_SZ Document
.xlsm REG_SZ Document
.xlsb REG_SZ Document
.ods REG_SZ Document
.svg REG_SZ Picture