精選文章

bcp大量匯出與匯入資料庫資料方法

--匯出-- bcp "select * from [資料庫名稱].[dbo].[資料表名稱]" queryout 匯出檔案名稱.txt -w -U "使用者帳號" -P "使用者密碼" " "...

2017年8月23日 星期三

搜尋檔案與導出

#搜尋檔案,會根據當前目錄往下爬,所以在跟C糟目錄下爬就相當於爬整個C糟。
C:\>dir /b /s "檔案名稱"
C:\>dir /b /s "sql.txt"

#也支援*搜尋方式
C:\>dir /b /s "sql.*"

#把結果寫入至D糟get.txt檔
C:\dir /b /s "sql.txt" > D:\get.txt