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

熱點內容
yeah郵箱的伺服器地址 發布:2025-09-16 23:36:52 瀏覽:701
c的引用java 發布:2025-09-16 23:36:48 瀏覽:307
的n次方編程 發布:2025-09-16 23:25:34 瀏覽:285
python安卓版 發布:2025-09-16 23:01:04 瀏覽:823
碼小易編程 發布:2025-09-16 23:00:56 瀏覽:335
在線音樂源碼 發布:2025-09-16 22:57:39 瀏覽:685
api開發php 發布:2025-09-16 22:06:15 瀏覽:600
mysql自動備份linux 發布:2025-09-16 21:58:33 瀏覽:947
怎麼用自己的伺服器ip做域名 發布:2025-09-16 21:49:57 瀏覽:919
vc為什麼能編譯不能用 發布:2025-09-16 21:48:03 瀏覽:748