Get-FileMetaData
export const frontMatter = { 'external help file': 'Keldor-help.xml', 'Module Name': 'Keldor', 'online version': 'https://devblogs.microsoft.com/scripting/', schema: '2.0.0' }; export const contentTitle = 'Get-FileMetaData'; export {default as metadata} from '@site/.docusaurus/docusaurus-plugin-content-docs/powershell/site-docs-powershell-keldor-get-file-meta-data-md-67f.json' export const assets = {
};
import {Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs} from "react/jsx-runtime"; import {useMDXComponents as _provideComponents} from "@mdx-js/react"; export const toc = [{ "value": "SYNOPSIS", "id": "synopsis", "level": 2 }, { "value": "SYNTAX", "id": "syntax", "level": 2 }, { "value": "DESCRIPTION", "id": "description", "level": 2 }, { "value": "EXAMPLES", "id": "examples", "level": 2 }, { "value": "EXAMPLE 1", "id": "example-1", "level": 3 }, { "value": "EXAMPLE 2", "id": "example-2", "level": 3 }, { "value": "EXAMPLE 3", "id": "example-3", "level": 3 }, { "value": "EXAMPLE 4", "id": "example-4", "level": 3 }, { "value": "PARAMETERS", "id": "parameters", "level": 2 }, { "value": "-Path", "id": "-path", "level": 3 }, { "value": "INPUTS", "id": "inputs", "level": 2 }, { "value": "OUTPUTS", "id": "outputs", "level": 2 }, { "value": "NOTES", "id": "notes", "level": 2 }, { "value": "RELATED LINKS", "id": "related-links", "level": 2 }]; function _createMdxContent(props) { const _components = { a: "a", code: "code", h1: "h1", h2: "h2", h3: "h3", header: "header", p: "p", pre: "pre", ..._provideComponents(), ...props.components }; return _jsxs(_Fragment, { children: [_jsx(_components.header, { children: _jsx(_components.h1, { id: "get-filemetadata", children: "Get-FileMetaData" }) }), "\n", _jsx(_components.h2, { id: "synopsis", children: "SYNOPSIS" }), "\n", _jsx(_components.p, { children: "This function gets file metadata and returns it as a custom PS Object." }), "\n", _jsx(_components.h2, { id: "syntax", children: "SYNTAX" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "language-powershell", children: "Get-FileMetaData [[-Path] <String[]>]\n" }) }), "\n", _jsx(_components.h2, { id: "description", children: "DESCRIPTION" }), "\n", _jsx(_components.p, { children: "This function gets file metadata using the Shell.Application object and\nreturns a custom PSObject object that can be sorted, filtered or otherwise\nmanipulated." }), "\n", _jsx(_components.h2, { id: "examples", children: "EXAMPLES" }), "\n", _jsx(_components.h3, { id: "example-1", children: "EXAMPLE 1" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "language-powershell", children: "Get-FileMetaData -Path "e:\music"\n" }) }), "\n", _jsx(_components.p, { children: "Gets file metadata for all files in the e:\music directory" }), "\n", _jsx(_components.h3, { id: "example-2", children: "EXAMPLE 2" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "language-powershell", children: "Get-FileMetaData -Path (gci e:\music -Recurse -Directory).FullName\n" }) }), "\n", _jsx(_components.p, { children: "This example uses the Get-ChildItem cmdlet to do a recursive lookup of\nall directories in the e:\music folder and then it goes through and gets\nall of the file metada for all the files in the directories and in the\nsubdirectories." }), "\n", _jsx(_components.h3, { id: "example-3", children: "EXAMPLE 3" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "language-powershell", children: "Get-FileMetaData -Path "c:\fso","E:\music\Big Boi"\n" }) }), "\n", _jsx(_components.p, { children: "Gets file metadata from files in both the c:\fso directory and the\ne:\music\big boi directory." }), "\n", _jsx(_components.h3, { id: "example-4", children: "EXAMPLE 4" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "language-powershell", children: "$meta = Get-FileMetaData -Path "E:\music"\n" }) }), "\n", _jsx(_components.p, { children: "This example gets file metadata from all files in the root of the\ne:\music directory and stores the returned custom objects in a $meta\nvariable for later processing and manipulation." }), "\n", _jsx(_components.h2, { id: "parameters", children: "PARAMETERS" }), "\n", _jsx(_components.h3, { id: "-path", children: "-Path" }), "\n", _jsx(_components.p, { children: "The path that is parsed for files" }), "\n", _jsx(_components.pre, { children: _jsx(_components.code, { className: "language-yaml", children: "Type: String[]\nParameter Sets: (All)\nAliases:\n\nRequired: False\nPosition: 1\nDefault value: None\nAccept pipeline input: False\nAccept wildcard characters: False\n" }) }), "\n", _jsx(_components.h2, { id: "inputs", children: "INPUTS" }), "\n", _jsx(_components.h2, { id: "outputs", children: "OUTPUTS" }), "\n", _jsx(_components.h2, { id: "notes", children: "NOTES" }), "\n", _jsx(_components.p, { children: "NAME: Get-FileMetaData\nAUTHOR: ed wilson, msft\nEdited By: Skyler Hart\nOriginal: 01/24/2014 14:08:24\nLast Edit: 2021-12-19 18:54:58\nKEYWORDS: Storage, Files, Metadata" }), "\n", _jsx(_components.h2, { id: "related-links", children: "RELATED LINKS" }), "\n", _jsxs(_components.p, { children: ["[", _jsx(_components.a, { href: "https://devblogs.microsoft.com/scripting/", children: "https://devblogs.microsoft.com/scripting/" }), "\n#Requires -Version 2.0](", _jsx(_components.a, { href: "https://devblogs.microsoft.com/scripting/", children: "https://devblogs.microsoft.com/scripting/" }), "\n#Requires -Version 2.0)"] })] }); } export default function MDXContent(props = {}) { const {wrapper: MDXLayout} = { ..._provideComponents(), ...props.components }; return MDXLayout ? _jsx(MDXLayout, { ...props, children: _jsx(_createMdxContent, { ...props }) }) : _createMdxContent(props); }