如何文件结构保存到文本文件? [英] How to save file structure to text file?
问题描述
我的是大约1TB大的媒体文件的文件夹。我想,文件名和目录结构保存到备份和参考的文本文件。我想这样的文件被备份之前保存到批处理或PowerShell脚本附加到我的备份过程。有谁知道一个简单的方法来做到这一点?
I have a folder of media files that are about 1TB big. I want to save the file names and directory structure to a text file for backup and reference. I want to attach a batch or PowerShell script to my backup process so the file gets saved before the backup. Does anyone know an easy way to do this?
推荐答案
您可以使用内置的tree.com实用程序:
You can use the built in tree.com utility:
树C:\\文件夹/˚F
tree c:\folder /F
还有一个PowerShell功能,展树,在PSCX 2.0:
There's also a PowerShell function, Show-Tree, in PSCX 2.0:
<一个href=\"http://rkeithhill.word$p$pss.com/2010/05/10/pscx-2-0-show-tree/\">http://rkeithhill.word$p$pss.com/2010/05/10/pscx-2-0-show-tree/
这篇关于如何文件结构保存到文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!