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

熱點內容
java返回this 發布:2025-10-20 08:28:16 瀏覽:549
製作腳本網站 發布:2025-10-20 08:17:34 瀏覽:833
python中的init方法 發布:2025-10-20 08:17:33 瀏覽:538
圖案密碼什麼意思 發布:2025-10-20 08:16:56 瀏覽:718
怎麼清理微信視頻緩存 發布:2025-10-20 08:12:37 瀏覽:639
c語言編譯器怎麼看執行過程 發布:2025-10-20 08:00:32 瀏覽:957
郵箱如何填寫發信伺服器 發布:2025-10-20 07:45:27 瀏覽:212
shell腳本入門案例 發布:2025-10-20 07:44:45 瀏覽:70
怎麼上傳照片瀏覽上傳 發布:2025-10-20 07:44:03 瀏覽:761
python股票數據獲取 發布:2025-10-20 07:39:44 瀏覽:667