Changes

Activity:DeleteDirectoryContent (Activity)

1,494 bytes added, 16:02, 7 January 2015
Created page with "{{ActivityInfoBox | title = Delete Directory Content | name = DeleteDirectoryContent | image = | imagecaption = Activity DeleteDirectoryContent | purpose = Delete directory..."
{{ActivityInfoBox
| title = Delete Directory Content
| name = DeleteDirectoryContent
| image =
| imagecaption = Activity DeleteDirectoryContent
| purpose = Delete directory and its content
| category = File Primitives
| returns = Number of deleted files
| version = 2.3+
}}
The DeleteDirectoryContent deletes directory content based on criteria and optionally, removes the directory itself.

==Arguments==
{| class="wikitable sortable" | width = "50%"
|-
! Argument !! Type !! Direction !! Purpose
|- align="left"
| CreationTime || {{DateTime_MSDN}} || In || Minimum creation time
|- align="left"
| DeleteEmptyDirectory || {{Boolean_MSDN}} || In || If true, an empty directory is deleted
|- align="left"
| Directory || {{String_MSDN}} || In || Directory full path
|- align="left"
| Filter || {{String_MSDN}} || In || Search pattern for files (extension)
|- align="left"
| LastWriteTime || {{DateTime_MSDN}} || In || Minimum last write time
|- align="left"
| Result || {{Int32_MSDN}} || Out || Number of deleted files including the directory
|}

==Usage==
This activity deletes all files matching the search pattern '''Filter''' and timestamp criteria '''CreationTime''' and '''LastWriteTime''' in the given directory. If '''DeleteEmptyDirectory''' = true the system tries to remove the directory as well. It returns the number of actual deleted files, including the directory.

==See also==
* [[Workflow Designer]]
* [[DeleteFile_(Activity)]]

[[Category:Workflows]]
[[Category:Activities]]
10,686
edits