From the course: PowerShell 7 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Manage files and directories

Manage files and directories - PowerShell Tutorial

From the course: PowerShell 7 Essential Training

Start my 1-month free trial

Manage files and directories

- [Instructor] A common task in PowerShell is managing the file system.. I've forgotten how many times I've had to run PowerShell to move files around, create new folder structures, et cetera. Now the good news is within PowerShell, we're able to access documents, folders, files, et cetera. Most of these commands, if we type get-command *item are under what's called the child item or something item so that we can obviously manage that. So you've got clear item, get child item for example. We can also say new item, move item, remove item. These are all underneath the Microsoft PowerShell management module and allow us to manage the files and disk locations on our machines. Now first off, what I want to be able to do is just set the location. So what we have here, I'm going to set a variable. So in the variable here, I have a folder called PS folder. So that means that when I now do location, it should already have that…

Contents