FMFlattenFolders.dll-Help.xml
<?xml version="1.0" encoding="utf-8" ?> <helpItems xmlns="http://msh" schema="maml"> <command:command xmlns:maml="http://schemas.microsoft.com/maml/2004/10" xmlns:command="http://schemas.microsoft.com/maml/dev/command/2004/10" xmlns:dev="http://schemas.microsoft.com/maml/dev/2004/10" xmlns:MSHelp="http://msdn.microsoft.com/mshelp"> <command:details> <command:name>Invoke-FlattenFolders</command:name> <command:verb>Invoke</command:verb> <command:noun>FlattenFolders</command:noun> <maml:description> <maml:para> Moves files from all sub-directories to the parent directory and optionally delete sub-directories. Duplicate files can be renamed by appending an index or GUID (-RenameMethod) </maml:para> </maml:description> </command:details> <maml:description> <maml:para> Moves files from all sub-directories to the parent directory. Duplicate files can be renamed by appending an index or GUID (-RenameMethod) </maml:para> <maml:para> Supports WhatIf. If supplied this will output a formatted table of the from and to file locations that will result from running the cmdlet. </maml:para> <maml:para> Can be run against: </maml:para> <maml:para> > a single directory </maml:para> <maml:para> > a collection of directories piped into the module. </maml:para> </maml:description> <command:parameters> <command:parameter required="false" pipelineInput="false" variableLength="true" position="0" aliases="D"> <maml:name>Directory</maml:name> <maml:description> <maml:para> The parent directory where files from all sub-directories will be moved. If neither this nor the Directories parameter are set then the current location will be used. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">String</command:parameterValue> <dev:type>String</dev:type> <dev:defaultvalue>Current directory</dev:defaultvalue> </command:parameter> <command:parameter required="false" pipelineInput="true" variableLength="true" aliases="none"> <maml:name>Directories</maml:name> <maml:description> <maml:para> A collection of parent directories where files from all sub-directories will be moved. If neither this nor the Directory parameter are set then the current location will be used. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="true">List<String></command:parameterValue> <dev:type>List<String></dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="false" aliases="F"> <maml:name>WhatIf</maml:name> <maml:description> <maml:para> If supplied this will output a formatted table of the from and to file locations that will result from running the cmdlet. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type>SwitchParameter</dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="false" aliases="DS"> <maml:name>DeleteSubDirectories</maml:name> <maml:description> <maml:para> If supplied all subdirectories will be deleted once all files have been moved. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type>SwitchParameter</dev:type> <dev:defaultValue>None</dev:defaultValue> </command:parameter> <command:parameter required="false" pipelineInput="false" variableLength="false" aliases="RM"> <maml:name>RenameMethod</maml:name> <maml:description> <maml:para> The strategy for renaming duplicate files. Valid values are "Guid" or "Index". Defaults to Index. </maml:para> </maml:description> <command:parameterValue required="false" variableLength="false">SwitchParameter</command:parameterValue> <dev:type>String</dev:type> <dev:defaultValue>Index</dev:defaultValue> </command:parameter> </command:parameters> <command:examples> <command:example> <maml:title>Example 1: No parameters</maml:title> <dev:code>PS C:\> Invoke-FlattenFolders</dev:code> <dev:remarks> <maml:para> All files in all sub-directories in the current location (C:\) will be moved to the current location (C:\). </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 2: Using the Force switch</maml:title> <dev:code>PS C:\> Invoke-FlattenFolders -Directory "C:\Videos" -WhatIf</dev:code> <dev:remarks> <maml:para> Displays an output table to terminal detailing that all files in all sub-directories in C:\Videos\ would be moved to C:\Videos\. </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 3: Using the DeleteSubDirectories switch</maml:title> <dev:code>PS C:\> Invoke-FlattenFolders -Directory "C:\Videos" -DeleteSubDirectories</dev:code> <dev:remarks> <maml:para> All files in all sub-directories in C:\Videos\ will be moved to C:\Videos\ and all sub-directories will be deleted once the files have been moved. </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 4: Using the RenameMethod switch</maml:title> <dev:code>PS C:\> Invoke-FlattenFolders -Directory "C:\Music" -DeleteSubDirectories -RenameMethod Index</dev:code> <dev:remarks> <maml:para> All files in all sub-directories in C:\Music will be moved to C:\Music\ and all sub-directories will be deleted once the files have been moved. Duplicates will be renamed with a numeric index. </maml:para> </dev:remarks> </command:example> <command:example> <maml:title>Example 5: Piping input</maml:title> <dev:code>PS C:\> "C:\Videos\","C:\Music\" | Invoke-FlattenFolders</dev:code> <dev:remarks> <maml:para> All files in all sub-directories in the piped array of directories (C:\Videos\ and C:\Music\) will be moved to their respective parents. </maml:para> </dev:remarks> </command:example> </command:examples> <maml:relatedLinks> <maml:navigationLink> <maml:linkText>https://github.com/futuremotiondev/FMFlattenFolders</maml:linkText> </maml:navigationLink> </maml:relatedLinks> </command:command> </helpItems> |