mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2024-10-05 20:47:50 -04:00
.
This commit is contained in:
parent
59b3136e74
commit
eed0f3807d
@ -1,3 +1,5 @@
|
|||||||
|
# Get-Help
|
||||||
|
|
||||||
# Get-Children
|
# Get-Children
|
||||||
|
|
||||||
Gets items in a specified location. To list the folders in my drive C, I will run
|
Gets items in a specified location. To list the folders in my drive C, I will run
|
||||||
@ -7,4 +9,22 @@ the command below:
|
|||||||
|
|
||||||
This will list all the top-level folders. To list all files, folders include subfolders use the -Recurse parameter.
|
This will list all the top-level folders. To list all files, folders include subfolders use the -Recurse parameter.
|
||||||
|
|
||||||
# Get-Help
|
# Copy-Item and Move-Item
|
||||||
|
|
||||||
|
You could use the Get-ChildItem Cmdlet to list items in a folder, then pipe
|
||||||
|
the result to Copy-Item Cmdlet to copy the items to a new location. The
|
||||||
|
command below will do the job:
|
||||||
|
|
||||||
|
`Get-ChildItem C:\Dropbox | Copy-Item -Destination C:\NewFolder`
|
||||||
|
|
||||||
|
The above PowerShell command will only copy the top-level folders and
|
||||||
|
files - it will NOT copy sub-folders and files. To copy all files and folders
|
||||||
|
including sub-folders, include the -Recurse parameter in the Get-ChildItem
|
||||||
|
command as shown below:
|
||||||
|
|
||||||
|
`Get-ChildItem C:\Dropbox -Recurse | Copy-Item -Destination C:\NewFolder`
|
||||||
|
|
||||||
|
While the Copy-Item Cmdlet copies items from one location to another the
|
||||||
|
Move-Item Cmdlet moves the item.
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user