Skip to content

Instantly share code, notes, and snippets.

@kayasax
Created Apr 29, 2015
Embed
What would you like to do?
Conserver les X fichiers plus récents d'un répertoire
#combien d'éléments à sauvegarder ?
$limit=5
ls $SourceDir |sort lastwritetime -desc |select -skip $limite # | remove-item
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment