如何将文件结构保存到文本文件? [英] 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:folder/F
tree c:folder /F
PSCX 2.0 中还有一个 PowerShell 函数 Show-Tree:
There's also a PowerShell function, Show-Tree, in PSCX 2.0:
http://rkeithhill.wordpress.com/2010/05/10/pscx-2-0-show-tree/
这篇关于如何将文件结构保存到文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文