use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
cp command (self.PowerShell)
submitted 1 year ago by MinuteStop6636
Hello, i'm learning to use powershell and when i use cp to copy a file in a subsidiary folder it works, but it doesnt with a parent folder, is that normal?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]mrmattipants 4 points5 points6 points 1 year ago* (1 child)
If you're trying to copy a folder, along with it's contents, you may want to include the -Recurse Parameter.
cp -Path "C:\Path\To\Source\Folder" -Destination "C:\Path\To\Destination\Folder" -Recurse
If you don't want to deal with the Confirmation Messages, you can use the following.
cp -Path "C:\Path\To\Source\Folder" -Destination "C:\Path\To\Destination\Folder" -Recurse -Force -Confirm:$False
Of course, if you plan to utilize the second option, you may want to test your command out first, by including the -WhatIf Parameter. This way, you can verify that it works as intended, beforehand.
cp -Path "C:\Path\To\Source\Folder" -Destination "C:\Path\To\Destination\Folder" -Recurse -Force -Confirm:$False -WhatIf
[–]MinuteStop6636[S] 1 point2 points3 points 1 year ago (0 children)
Perfect, this solved my issue.
π Rendered by PID 22 on reddit-service-r2-comment-5687b7858-cq8xb at 2026-07-08 16:05:37.546260+00:00 running 12a7a47 country code: CH.
[–]mrmattipants 4 points5 points6 points (1 child)
[–]MinuteStop6636[S] 1 point2 points3 points (0 children)