當前位置:首頁 » 文件管理 » vb創建文件夾

vb創建文件夾

發布時間: 2023-06-11 09:31:07

❶ vb中如何新建文件夾和復制文件夾啊(包括裡面的文件)

Sub 文件夾()
Dim fs As FileSystemObject
Dim fd As Folder
Dim f1 As File
Dim f2 As File
Dim a As Boolean

Set fs = CreateObject("Scripting.FileSystemObject")

a = fs.FolderExists("E:\文件夾\123")
If a Then
Set fd = fs.GetFolder("E:\文件夾\123")
For Each f1 In fd.Files
If LCase(Right(f1.Name, 4)) = ".ini" Then
f1.Delete True
End If
Set f2 = fs.GetFile("D:\內容\aa.ini")
f2.Copy "E:\文件夾\123\", True
Next
Else
Set fd = fs.CreateFolder("E:\文件夾\123")
Set f2 = fs.GetFile("D:\內容\aa.ini")
f2.Copy "E:\文件夾\123", True
End If
End Sub

❷ VB怎麼才能在某個地方生成一個文件或文件夾

'vb有mkdir的,他隸屬filesystem,功能是創建一個文件夾及目錄
dim
fixx
fixx
=
"c:\"
&
replace(now,
":",
".",
,
,
vbtextcompare)
mkdir
fixx
'
在c盤根目錄下生成以年月日時分秒為文件名的文件夾
'我試過了,可以的!

❸ 怎樣用VB創建文件夾

熱點內容
vc為什麼能編譯不能用 發布:2025-09-16 21:48:03 瀏覽:739
編譯原理沖突圖的定義 發布:2025-09-16 21:26:45 瀏覽:805
安卓手機芯哪個牌子好 發布:2025-09-16 21:26:33 瀏覽:203
centos編譯安裝git 發布:2025-09-16 21:19:55 瀏覽:971
安卓系統如何使用手機優盤 發布:2025-09-16 21:14:01 瀏覽:328
在手機上注冊公積金如何設置密碼 發布:2025-09-16 21:07:01 瀏覽:820
無控制器存儲 發布:2025-09-16 21:02:44 瀏覽:713
陰陽師ios清理緩存 發布:2025-09-16 21:02:35 瀏覽:514
人人網訪問記錄 發布:2025-09-16 20:53:46 瀏覽:385
oracle資料庫實例 發布:2025-09-16 20:23:04 瀏覽:564