PowerShell将多个文件夹的子标签移至自己的子文件夹中
我正在研究一个项目,以清理文件服务器的文件夹重定向文件夹。想在PS脚本上寻求一些帮助,该脚本可以将用户文件夹中的文件移动到新的“文档”子文件夹中,因为我们面临着手动执行此配置文件的手动执行此操作。
当前的树示例看起来像:
―FolderRedirection
―――JContoso
――――――File.docx
――――――File.pptx
―――MDerby
――――――File.docx
――――――File.pptx
我希望能够实现:
―FolderRedirection
―――JContoso
――――――Documents
―――――――――File.docx
―――――――――File.pptx
―――MDerby
――――――Documents
―――――――――File.docx
―――――――――File.pptx
I'm working on a project cleaning up a file server's folder redirection folders. Would like to ask for some help with a PS script that would move the files in user folders into new "Documents" sub-folders, as we're facing manually performing this for a lot of profiles.
A tree example currently looks like:
―FolderRedirection
―――JContoso
――――――File.docx
――――――File.pptx
―――MDerby
――――――File.docx
――――――File.pptx
I'd like to be able to achieve:
―FolderRedirection
―――JContoso
――――――Documents
―――――――――File.docx
―――――――――File.pptx
―――MDerby
――――――Documents
―――――――――File.docx
―――――――――File.pptx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这应该有效,请记住以后的问题,您应该至少提供最小的尝试来解决该问题。
内联注释应帮助您使用代码逻辑。
This should work, bear in mind for future questions you should provide at least a minimal attempt at solving the problem.
The inline comments should help you with the code logic.