Problem with WQL query [CIM_DataFile]:Property-combinations fail

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Manfred Braun (aa_at_bb.cc)
Date: 12/04/04

  • Next message: Torgeir Bakken \(MVP\): "Re: Win32_ScheduledJob in Windows 2000 Pro"
    Date: Sat, 4 Dec 2004 22:00:51 +0100
    
    

    Hi All,

    I am doing a wql-select to find a set of files or a completely specified
    filename. My only problem is, if I specify some property-combinations,
    nothing is returned. For example:

    select * from CIM_DataFile where (Drive = 'c:') and (Path = '\\test\\') and
    (Extension = 'txt')

    returns a result, one of them is "c:\test\demo.txt", exactly, what I expect.
    But if I use

    select * from CIM_DataFile where (Drive = 'c:') and (Path = '\\test\\') and
    (Extension = 'txt') and (FileName = 'demo')

    the query executes properly, but returns an empty resultset. If I specify
    the FileName, but not the extension, it works also. The problem occurs only,
    if I specify drive, path, FileName and Extension together. I am currently
    building a wmi-based library, which should be useful under all conditions
    [Ok, I I know and have the full qualified filename, I would use another
    method!]. I use and need WMI for that, because it allows impersonation in
    web-management tools.

    Any help would be great!

    Best regards,
    Manfred Braun

    (Private)
    Mannheim
    Germany

    mailto:_manfred.braun_@manfbraun.de
    (Remove the anti-spam-underscore to mail me!)


  • Next message: Torgeir Bakken \(MVP\): "Re: Win32_ScheduledJob in Windows 2000 Pro"

    Relevant Pages

    • Re: Reporting Services and Excel
      ... Once again Keith, your advised has helped me tremendously, Thanks!!..In terms ... of the name of the file, I noticed that you can specify a filename if you are ... saving the report to a fileshare directory but you cannot specify a filename ...
      (microsoft.public.sqlserver.server)
    • Re: start path of uigetfile, remember last path
      ... That seems only work in the format you give, ie., you can't specify ... any specific extension you want, ... [filename, pathname] ... Matlab uigetfile opens the current directory as the starting ...
      (comp.soft-sys.matlab)
    • Re: Secure C library - fopentmp_s (a usable secure create and open named temporary file)
      ... I would like to be able to specify all three. ... The filename is then generated by filling the remaining of fname. ... Although this specification would allow many different implementations, the drawback is that it assumes that the initial portion of a filename has some useful interpretation, like directory names in POSIX and Windows. ... Another possibility would be to add a template parameter which specifies how the filename is to be constructed. ...
      (comp.std.c)
    • File Upload - ValidationExpression (ASP.NET). Please help!!!
      ... "You must specify the file location and the filename must follow this ... Do I need to put it in ValidationExpression? ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Filename Problem
      ... specified which is then opened and loaded into the matlab workspace. ... [filename, pathname] ... The easiest thing is to specify an output argument for load: ...
      (comp.soft-sys.matlab)