English
Source / code snippets

File detect Info Ocx

 
- Page 1 -



Uwe
''Pascal''
Niemeier
Hi people!

here an example, circa any (!) available Information over a File once To
detect:
(with "verfügbare Informationen" are The in the windows-Explorer in the detail-view wählbaren
Split gemeint; the counts too for Files within one ZIP-Archives)
window 700,500
 $H ocx3a.ph
 $I ocx3a.inc
ocxInit()
var File$="C:1TestApril Rain.mp3"-------File / Ordner (without Backslash on the end)
var File$="D:Test.zipTestReadMe.txt"--File / Ordner within (!) of/ one zipper-File
var Folder$=del$(File$,len(File$,"\"),1,"\")-----Übergeordneter Ordner of File$
var name$=substr$(File$,-1,"\")-------------------Dateiname of File$
var Shell&=ocxCreate("Shell.Application")----------Shell-Objekt
var Folder&=ocxMethod(Shell&,"NameSpace",Folder$)--Folder-Objekt
var File&=ocxMethod(Folder&,"ParseName",name$)-----FolderItem-Objekt
var Lv&=create("gridbox",%hwnd,"Nr;0;40;Eigenschaft;0;250;Wert;0;250",0,10,10,600,400)
declare Info$,Data$

whileloop 0,50------------------------------------------How many details Gibts eigendlich?

    Info$=ocxMethod(Folder&,"GetDetailsOf",0,&loop)------In Folder available Beschreibungen
    casenot len(Info$):continue--------------------------some Beschreibungen are empty (?)
    Data$=ocxMethod(Folder&,"GetDetailsOf",File&,&loop)--details To File
    addstring(Lv&,st$(&loop)+"|"+Info$+"|"+Data$)-------To GridBOX add

endwhile

Data$=ocxMethod(Folder&,"GetDetailsOf",File&,-1)--------Text of ToolTip (if available)
case len(Data$):messagebox(Data$,"ToolTip-Text",0)
ocxRelease(File&,Folder&,Shell&)
ocxDeInit()
waitkey

PS: details to see MSDN under "Shell Objects for Scripting and Microsoft Visual Basic"

SeeYou
Pascal
 
12/30/09  
 



« this Posting watts as Solution marked. »


Jörg
Sellmeyer
here again the reparierte Code Uwe:
window 700,500
 $H ocx3a.ph
 $I ocx3a.inc
ocxInit()
var File$="D:\\ever\\one\\way\\To\\of/ one\\music.MP3"'-------File
'Ordner go without Backslash end transfer
'The File in the archive becomes as an File in the normalen Dateisystem called
'var File$="D:\\ever\\one\\way\\To\\one\\archive.zipper\\File.txt"'--File / Ordner within (!) of/ one zipper-File
var Folder$=del$(File$,len(File$,"\\"),1,"\\")'-----Übergeordneter Ordner of File$
var name$=substr$(File$,-1,"\\")'-------------------Dateiname of File$
var Shell&=ocxCreate("Shell.Application")'----------Shell-Objekt
var Folder&=ocxMethod(Shell&,"NameSpace",Folder$)'--Folder-Objekt
var File&=ocxMethod(Folder&,"ParseName",name$)'-----FolderItem-Objekt
var Lv&=create("gridbox",%hwnd,"Nr;0;40;Eigenschaft;0;250;Wert;0;250",0,10,10,600,400)
declare Info$,Data$

whileloop 0,50'------------------------------------------How many details Gibts eigendlich?

    Info$=ocxMethod(Folder&,"GetDetailsOf",0,&loop)'------In Folder available Beschreibungen
    casenot len(Info$):continue'--------------------------some Beschreibungen are empty (?)
    Data$=ocxMethod(Folder&,"GetDetailsOf",File&,&loop)'--details To File
    addstring(Lv&,st$(&loop)+"|"+Info$+"|"+Data$)'-------To Add gridBOX

endwhile

Data$=ocxMethod(Folder&,"GetDetailsOf",File&,-1)'--------Text of ToolTip (if available)
case len(Data$):messagebox(Data$,"ToolTip-Text",0)
ocxRelease(File&,Folder&,Shell&)
ocxDeInit()
waitkey
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/01/18  
 



OMG, How yummy. ^^
 
12/30/09  
 




Jörg
Sellmeyer
because ichs so interestingly find, have I from it time a small procedure made, with the one quick single contents abrufen can:
'0 = name
'1 = Size
'2 = type
'3 = changed on the
'4 = prepares on the
'5 = last grabbed on the
'6 = attributes
'7 = status
'8 = owner
'9 = Author
'10 = cover
'11 = Topic
'12 = category
'13 = pages
'14 = comments
'15 = copyright
'16 = Interpret
'17 = Albumtitel
'18 = year
'19 = Titelnummer
'20 = Genre
'21 = duration
'22 = Bitrate
'23 = protected
'24 = Kameramodell
'25 = Image adopted on the
'26 = dimensions
'27 = X Pixel
'28 = Y Pixel
'29 = Folgenname
'30 = Sendungsbeschreibung
'31 =
'32 = Abtastgröße
'33 = Abtastrate
'34 = Kanäle
'35 = firm
'36 = Description
'37 = Dateiversion
'38 = Produktname
'39 = Produktversion
'40 = Keywords
 $H ocx3a.ph
 $I ocx3a.inc

Proc GetFileInfo

    Parameters File$,Info%
    ocxInit()
    Var Folder$ = Del$(File$,len(File$,"\"),1,"\")'-----Übergeordneter Ordner of File$
    Var name$ = SubStr$(File$,-1,"\\")'-------------------Dateiname of File$
    '$D "",File$,Info%,Folder$,name$
    Var Shell& = ocxCreate("Shell.Application")'----------Shell-Objekt
    Var Folder& = ocxMethod(Shell&,"NameSpace",Folder$)'--Folder-Objekt
    Var File& = ocxMethod(Folder&,"ParseName",name$)'-----FolderItem-Objekt
    Var Info$ = ocxMethod(Folder&,"GetDetailsOf",File&,Info%)
    ocxRelease(File&,Folder&,Shell&)
    ocxDeInit()
    Return Info$

ENDPROC

Window 400,650

WhileLoop 0,40

    Print &Loop,GetFileInfo(Par$(0),&Loop)

Wend

waitkey
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
12/31/09  
 




Jörg
Sellmeyer
here again the reparierte Code Uwe:
window 700,500
 $H ocx3a.ph
 $I ocx3a.inc
ocxInit()
var File$="D:\\ever\\one\\way\\To\\of/ one\\music.MP3"'-------File
'Ordner go without Backslash end transfer
'The File in the archive becomes as an File in the normalen Dateisystem called
'var File$="D:\\ever\\one\\way\\To\\one\\archive.zipper\\File.txt"'--File / Ordner within (!) of/ one zipper-File
var Folder$=del$(File$,len(File$,"\\"),1,"\\")'-----Übergeordneter Ordner of File$
var name$=substr$(File$,-1,"\\")'-------------------Dateiname of File$
var Shell&=ocxCreate("Shell.Application")'----------Shell-Objekt
var Folder&=ocxMethod(Shell&,"NameSpace",Folder$)'--Folder-Objekt
var File&=ocxMethod(Folder&,"ParseName",name$)'-----FolderItem-Objekt
var Lv&=create("gridbox",%hwnd,"Nr;0;40;Eigenschaft;0;250;Wert;0;250",0,10,10,600,400)
declare Info$,Data$

whileloop 0,50'------------------------------------------How many details Gibts eigendlich?

    Info$=ocxMethod(Folder&,"GetDetailsOf",0,&loop)'------In Folder available Beschreibungen
    casenot len(Info$):continue'--------------------------some Beschreibungen are empty (?)
    Data$=ocxMethod(Folder&,"GetDetailsOf",File&,&loop)'--details To File
    addstring(Lv&,st$(&loop)+"|"+Info$+"|"+Data$)'-------To Add gridBOX

endwhile

Data$=ocxMethod(Folder&,"GetDetailsOf",File&,-1)'--------Text of ToolTip (if available)
case len(Data$):messagebox(Data$,"ToolTip-Text",0)
ocxRelease(File&,Folder&,Shell&)
ocxDeInit()
waitkey
 
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/01/18  
 




Jörg
Sellmeyer
Nochmal The Korrektur updated. now GEHTS too with the File in the archive.
 
XProfan X4
Windows XP SP2 XProfan X4
... und hier mal was ganz anderes als Profan ...
06/27/18  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

10.061 Views

Untitledvor 0 min.
Walter11/28/22
Stringray01/05/22
Sven Bader08/16/21
AndreasS10/28/20
More...

Themeninformationen



Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie