Practice Exercise1: File Operations/Searching/Basic PowerShell Operators 1.) Create a folder TestingPurpose and 3 Subfolders inside it SubFolder1, SubFolder2 2.) Create some test files inside these folders: TypeATest1.txt, TypeATest2.txt … TypeATest50.txt into SubFolder1 TypeBTest51.txt, Purpose52Test2.txt … TypeBTest100 into SubFolder2 Needless to say that you have to use logic for creating these files. Not one by one 3.) Move all files which have an odd number in its name to SubFolder2 4.) Move all files which have even number in its name to SubFolder1 5.) Rename folder SubFolder1 to EvenFilesContainer and SubFolder2 to OddFilesContainer 5.) Prepare a list of all files currently existing inside folder TestingPurpose Example: MasterFile.txt: As of YYYYMMDD HH: MM files inside Testing Purpose are: C:\testingPurpose\EvenFilesContainer\TypeBTest2.txt . . C:\testingPurpose\OddFilesContainer\TypeATest99.txt 6.) Delete all files which start with TypeA
Comments
Post a Comment