批处理文件以查找所有Access数据库 [英] Batch file to find all Access Databases

查看:165
本文介绍了批处理文件以查找所有Access数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要帮助来创建一个批处理文件,该文件在所有具有.accdb的文件的文件目录中查找,然后将文件名和完整路径写入文本文件.第一次这样做,越详细越好.我想了解这一点,所以我可以创建其他批处理文件.

I need help creating a Batch file that looks in a file dir for all files that have .accdb, then writes the file name and full path to a text file. First time doing this so the more detail the better. I would like to understand this so I can create other batch files.

推荐答案

这将从当前目录及以下目录中搜索:

This will search from the current directory and below:

dir *.accdb /s /b /a-d >file.txt

这是命令的另一种形式,可从特定文件夹搜索并写入其他位置的文件:

This is another form of the command to search from a particular folder and write to a file in another location:

dir "c:\folder\*.accdb" /s /b /a-d >"d:\other folder\file.txt"

这篇关于批处理文件以查找所有Access数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆