- Katılım
- 26 Ocak 2007
- Mesajlar
- 4,625
- Excel Vers. ve Dili
- Ofis 2016
- Altın Üyelik Bitiş Tarihi
- 20-02-2025
Merhaba arkadaşlar. Aşağıda üstadımız Levent Menteşoğlu'nun yazmış olduğu harika bir kod var. bu kod ile dosya özellik bilgilerini Browserdan seçilen yere kaytdetmek mümkün. Peki bilgilerin kayıt edilmesi istenen dosya kodun içine yazılmak istenirse; kod nasıl revize edilmelidir ?
Sub dosyaozellikleri()
On Error Resume Next
Set klasor = CreateObject("Shell.Application").BrowseForFolder(0, "Lütfen bir klasör seçin !", &H100)
klasoryolu = klasor.Items.Item.Path
If klasoryolu = "" Then Exit Sub
For Each dosyaadi In CreateObject("Scripting.FileSystemObject").GetFolder(klasoryolu).Files
c = c + 1
Set dosya = CreateObject("Shell.Application").Namespace(klasor).ParseName(dosyaadi.Name)
Cells(1, c + 1) = dosyaadi.Name
For a = 1 To 40
If c = 1 Then Cells(a + 1, "a") = CreateObject("Shell.Application").Namespace(klasor).GetDetailsOf("", a)
Cells(a + 1, c + 1) = CreateObject("Shell.Application").Namespace(klasor).GetDetailsOf(dosya, a)
Next
Next
End Sub
Sub dosyaozellikleri()
On Error Resume Next
Set klasor = CreateObject("Shell.Application").BrowseForFolder(0, "Lütfen bir klasör seçin !", &H100)
klasoryolu = klasor.Items.Item.Path
If klasoryolu = "" Then Exit Sub
For Each dosyaadi In CreateObject("Scripting.FileSystemObject").GetFolder(klasoryolu).Files
c = c + 1
Set dosya = CreateObject("Shell.Application").Namespace(klasor).ParseName(dosyaadi.Name)
Cells(1, c + 1) = dosyaadi.Name
For a = 1 To 40
If c = 1 Then Cells(a + 1, "a") = CreateObject("Shell.Application").Namespace(klasor).GetDetailsOf("", a)
Cells(a + 1, c + 1) = CreateObject("Shell.Application").Namespace(klasor).GetDetailsOf(dosya, a)
Next
Next
End Sub