Как узнать свойства файла

Файл = Новый Файл("ИмяФайла");
Shell = Новый COMОбъект("Shell.Application"); NameSpace = Shell.NameSpace(Файл.Путь); ParseName = NameSpace.ParseName(Сред(Файл.ПолноеИмя, СтрНайти(Файл.ПолноеИмя, "\", НаправлениеПоиска.СКонца) + 1)); Для Сч=-100 По 500 Цикл Попытка Сообщить("" + Сч + "|" + NameSpace.GetDetailsOf(Неопределено, Сч) + "|" + NameSpace.GetDetailsOf(ParseName, Сч)); Исключение КонецПопытки; КонецЦикла;

 

Пример результата:  

-1   Item type: PNG File
Dimensions: ‪822 x 556‬
Size: 45,8 KB
0 Name fubrlbrkdqix.png
1 Size 45,8 KB
2 Item type PNG File
3 Date modified 31.01.2015 1:40
4 Date created 06.01.2016 12:46
5 Date accessed 06.01.2016 12:46
6 Attributes A
7 Offline status  
8 Availability Available offline
9 Perceived type Image
10 Owner MyComputer\Evgeny
11 Kind Picture
12 Date taken  
13 Contributing artists  
14 Album  
15 Year  
16 Genre  
17 Conductors  
18 Tags  
19 Rating Unrated
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 ‪822 x 556‬
32 Camera maker  
33 Company  
34 File description  
35 Program name  
36 Duration  
37 Is online  
38 Is recurring  
39 Location  
40 Optional attendee addresses  
41 Optional attendees  
42 Organizer address  
43 Organizer name  
44 Reminder time  
45 Required attendee addresses  
46 Required attendees  
47 Resources  
48 Meeting status  
49 Free/busy status  
50 Total size 831 GB
51 Account name  
52    
53 Task status  
54 Computer SERVER (this PC)
55 Anniversary  
56 Assistant's name  
57 Assistant's phone  
58 Birthday  
59 Business address  
60 Business city  
61 Business country/region  
62 Business P.O. box  
63 Business postal code  
64 Business state or province  
65 Business street  
66 Business fax  
67 Business home page  
68 Business phone  
69 Callback number  
70 Car phone  
71 Children  
72 Company main phone  
73 Department  
74 E-mail address  
75 E-mail2  
76 E-mail3  
77 E-mail list  
78 E-mail display name  
79 File as  
80 First name  
81 Full name  
82 Gender  
83 Given name  
84 Hobbies  
85 Home address  
86 Home city  
87 Home country/region  
88 Home P.O. box  
89 Home postal code  
90 Home state or province  
91 Home street  
92 Home fax  
93 Home phone  
94 IM addresses  
95 Initials  
96 Job title  
97 Label  
98 Last name  
99 Mailing address  
100 Middle name  
101 Cell phone  
102 Nickname  
103 Office location  
104 Other address  
105 Other city  
106 Other country/region  
107 Other P.O. box  
108 Other postal code  
109 Other state or province  
110 Other street  
111 Pager  
112 Personal title  
113 City  
114 Country/region  
115 P.O. box  
116 Postal code  
117 State or province  
118 Street  
119 Primary e-mail  
120 Primary phone  
121 Profession  
122 Spouse/Partner  
123 Suffix  
124 TTY/TTD phone  
125 Telex  
126 Webpage  
127 Content status  
128 Content type  
129 Date acquired  
130 Date archived  
131 Date completed  
132 Device category  
133 Connected  
134 Discovery method  
135 Friendly name  
136 Local computer  
137 Manufacturer  
138 Model  
139 Paired  
140 Classification  
141 Status  
142 Status  
143 Client ID  
144 Contributors  
145 Content created  
146 Last printed  
147 Date last saved  
148 Division  
149 Document ID  
150 Pages  
151 Slides  
152 Total editing time  
153 Word count  
154 Due date  
155 End date  
156 File count  
157 File extension .png
158 Filename fubrlbrkdqix.png
159 File version  
160 Flag color  
161 Flag status  
162 Space free 157 GB
163    
164    
165 Group  
166 Sharing type  
167 Bit depth 8
168 Horizontal resolution ‎96 dpi
169 Width ‎822 pixels
170 Vertical resolution ‎96 dpi
171 Height ‎556 pixels
172 Importance  
173 Is attachment  
174 Is deleted  
175 Encryption status  
176 Has flag  
177 Is completed  
178 Incomplete  
179 Read status  
180 Shared No
181 Creators  
182 Date  
183 Folder name TEMP
184 Folder path F:\TEMP
185 Folder TEMP (F:)
186 Participants  
187 Path F:\TEMP\fubrlbrkdqix.png
188 By location  
189 Type PNG File
190 Contact names  
191 Entry type  
192 Language  
193 Date visited  
194 Description  
195 Link status Unresolved
196 Link target  
197 URL  
198    
199    
200    
201 Media created  
202 Date released  
203 Encoded by  
204 Episode number  
205 Producers  
206 Publisher  
207 Season number  
208 Subtitle  
209 User web URL  
210 Writers  
211    
212 Attachments  
213 Bcc addresses  
214 Bcc  
215 Cc addresses  
216 Cc  
217 Conversation ID  
218 Date received  
219 Date sent  
220 From addresses  
221 From  
222 Has attachments  
223 Sender address  
224 Sender name  
225 Store  
226 To addresses  
227 To do title  
228 To  
229 Mileage  
230 Album artist  
231 Sort album artist  
232 Album ID  
233 Sort album  
234 Sort contributing artists  
235 Beats-per-minute  
236 Composers  
237 Sort composer  
238 Initial key  
239 Part of a compilation  
240 Mood  
241 Part of set  
242 Period  
243 Color  
244 Parental rating  
245 Parental rating reason  
246 Space used ‎81%
247 EXIF version  
248 Event  
249 Exposure bias  
250 Exposure program  
251 Exposure time  
252 F-stop  
253 Flash mode  
254 Focal length  
255 35mm focal length  
256 ISO speed  
257 Lens maker  
258 Lens model  
259 Light source  
260 Max aperture  
261 Metering mode  
262 Orientation  
263 People  
264 Program mode  
265 Saturation  
266 Subject distance  
267 White balance  
268 Priority  
269 Project  
270 Channel number  
271 Episode name  
272 Closed captioning  
273 Rerun  
274 SAP  
275 Broadcast date  
276 Program description  
277 Recording time  
278 Station call sign  
279 Station name  
280 Summary  
281 Snippets  
282 Auto summary  
283 Relevance  
284 Encrypted to  
285 Sensitivity  
286 Shared with <Unknown Contact>
287 Sharing status Shared
288   Available
289 Product name  
290 Product version  
291 Support link  
292 Source  
293 Start date  
294 Sharing  
295 Billing information  
296 Complete  
297 Task owner  
298 Sort title  
299 Total file size  
300 Legal trademarks  
301 Video compression  
302 Directors  
303 Data rate  
304 Frame height  
305 Frame rate  
306 Frame width  
307 Video orientation  
308 Total bitrate  
309 Backup Method  
310 Backup Comment  
в Среда января 06 от Администратор
Было ли это полезно?