當前位置:首頁 » 文件管理 » 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創建文件夾

熱點內容
scratch少兒編程課程 發布:2025-04-16 17:11:44 瀏覽:626
榮耀x10從哪裡設置密碼 發布:2025-04-16 17:11:43 瀏覽:356
java從入門到精通視頻 發布:2025-04-16 17:11:43 瀏覽:71
php微信介面教程 發布:2025-04-16 17:07:30 瀏覽:296
android實現陰影 發布:2025-04-16 16:50:08 瀏覽:787
粉筆直播課緩存 發布:2025-04-16 16:31:21 瀏覽:337
機頂盒都有什麼配置 發布:2025-04-16 16:24:37 瀏覽:202
編寫手游反編譯都需要學習什麼 發布:2025-04-16 16:19:36 瀏覽:798
proteus編譯文件位置 發布:2025-04-16 16:18:44 瀏覽:355
土壓縮的本質 發布:2025-04-16 16:13:21 瀏覽:582