...& uzanti
Kayıt_Yeri = yer & Yedek_Dosya_Adı
On Error Resume Next
If Dir(yer) = "" Then MkDir yer
On Error Resume Next
DosyaSistemi.CopyFile ThisWorkbook.FullName, Kayıt_Yeri
ActiveWorkbook.Password = ""
MsgBox "Dosyanız aşağıdaki isimle yedeklenmiştir." & Chr(10) & Kayıt_Yeri, vbInformation...
...= Cells(Rows.Count, "P").End(xlUp).Row
KaynakDosya = "C:\Şahin\Anadosya\Guncel.xlsb"
HedefKlasör = "C:\Şahin\Databese\"
For i = 2 To SonSatir
DosyaAdi = Cells(i, 16).Value & ".xlsb"
FSO.CopyFile Source:=KaynakDosya, Destination:=HedefKlasör & "\" & DosyaAdi
Next i
End Sub
...Then
My_Array.Add New_File_Name, 0
If Dir(New_File_Name) = "" Then
FSO.CopyFile Old_File_Name, New_File_Name
End If
Else
My_Array.Item(New_File_Name) =...
...& "{" & kls
Next
End If
x = x + 1
deg = Split(klslst, "{")
yol = deg(x)
Dosya = Dir$(yol & "\*.*")
Do While Dosya <> ""
Say = Say + 1
ds.CopyFile yol & "\" & Dosya, anayol & "\topla\" & Dosya
Dosya = Dir$()
Loop
If x = 1 And ds.GetFolder(yol).subfolders.Count > 0 Then GoTo Tekrar
Loop...
...& "{" & kls
Next
End If
x = x + 1
deg = Split(klslst, "{")
yol = deg(x)
dosya = Dir$(yol & "\*.*")
Do While dosya <> ""
Say = Say + 1
ds.CopyFile yol & "\" & dosya, anayol & "\topla\" & dosya
dosya = Dir$()
Loop
If x = 1 And ds.GetFolder(yol).subfolders.Count > 0 Then GoTo Tekrar
Loop...
...bunun yerine kopyala ve silme işlemi yapabilirsiniz.
Aşağıdaki fonksiyonu kendinize uyarlayınız.
Kaynak İçin Tıklayınız
Function MoveFile(source, target)
Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")
fso.CopyFile source, target, True
fso.DeleteFile source
End Function
...'Dosya zaten hedef klasörde yok ise, dosya kopyalanır
ElseIf Not FSO.FileExists(hedef & dokuman) Then
FSO.CopyFile (kaynak & dokuman), hedef ', True
Else
MsgBox "Specified File Already Exists In The Destination Folder", vbExclamation, "File Already...
...fso = VBA.CreateObject("Scripting.FileSystemObject")
With Application.FileDialog(msoFileDialogFilePicker)
.Title = "Dosya Seçiniz"
If .Show = True Then
dosya = .SelectedItems(1)
End If
End With
fso.CopyFile dosya, ThisWorkbook.Path & "\Resim Dosyaları\"
End Sub
Değerli @Korhan Ayhan hocam masaüstüne kayıt etmek istediğimde
Dosya yolunu bulamıyor ve şu satırda hata veriyor
Fso.CopyFile ThisWorkbook.FullName, File_Path & "Temp_File." & Fso.GetExtensionName(ThisWorkbook.Name), True
Sizlere daha iyi bir deneyim sunabilmek icin sitemizde çerez konumlandırmaktayız, web sitemizi kullanmaya devam ettiğinizde çerezler ile toplanan kişisel verileriniz Veri Politikamız / Bilgilendirmelerimizde belirtilen amaçlar ve yöntemlerle mevzuatına uygun olarak kullanılacaktır.