Jump to content

Dosya Konumunu Yazdırmak Ve Kopyalatmak


WolfmanTR_
 Share

Recommended Posts

arkadaşlar,yapacak bir iş bulamadğım için bir doya kopyalayıcı yapayım dedim, şimdi File.Browse ile seçtiğim dosya inputa yazdırıyor.Folder.Browse ile de Label e yazdırmak istiyorum ama yazdıramadım. birde dosyayı kopyalad diyor ama kopyalamıyor(seçilen konuma.)

kodlar

 

Global

function dosya ()

ProSec = Dialog.FileBrowse(true, "Program Seçiniz...", _DesktopFolder, "Tüm Dosyalar", "", "dat", true, false);
Input.SetText("Input1", ProSec[1]);
xButton.SetEnabled("xButton1", true);
if ProSec[1] ~= "CANCEL" and ProSec[1] ~= nil then
end
end

function konum()
	sProSec = Dialog.FolderBrowse("Kopyalanacak Yeri Seçin", "_DeskopFolder");
	--Label.SetText("Label2", sProSec[1]);
	if sProSec[1] ~= "CANCEL" and sProSec[1] ~= nil then
	end
end	
function kopyala()

File.Copy("..ProSec..", "..sProSec..", true, true, false, true, nil);
Dialog.Message("Dosya", sProSec.." konumuna taşındı", MB_OK, MB_ICONINFORMATION, MB_DEFBUTTON1);
end
Edited by wolfman.tr_
Link to comment
Share on other sites

  • Editor
File.Copy("..ProSec..", "..sProSec..", true, true, false, true, nil);

 

burada sen değişkenleri tanımlamışmısın kardeş bi bakı ver istersen diğer kodlarında yanlış tamamen.

 

File.Copy(ProSec,sProSec, true, true, false, true, nil);

 

Doğrusu bu şekilde olacak.

Link to comment
Share on other sites

arkadaşlar, ben file.browse ile seçilen dosyaları alt. alta yazdırıyorum ama Konum=C\\asd.exe diye yazmıyor sadece Konum=asd yazıyor onu nasıl yaparım?

 

Not: sorun :String.SplitPath(v); dan kaynaklanıyor, String.SplitPath(v); yenine ne yazmalıyım ?

 

function dosya ()
nSecilen = Dialog.FileBrowse(true, "Program Seçiniz...", _DesktopFolder, "Tüm Dosyalar", "", "dat", true, false);
if (nSecilen[1] ~= "CANCEL") and (nSecilen ~= nil) then

for i,v in pairs(nSecilen) do
Boyut = File.GetSize(v);
   YenidenHesapla = String.GetFormattedSize(Boyut, FMTSIZE_AUTOMATIC, true);
 Konum = String.SplitPath(v); 
Input.SetText("Input1", nSecilen[i]);
xButton.SetEnabled("xButton1", true);
INIFile.SetValue("AutoPlay\\Docs\\data.ini", "Dosya", "Konum"..i,""..Konum.Filename.."");
end
end
end
Link to comment
Share on other sites

  • Editor
INIFile.SetValue("AutoPlay\\Docs\\data.ini", "Dosya", "Konum"..i,Konum.Filename..Konum.Extension");

 

Bununla değiştir kodlamalarda çift tırnakları hatalı kullanıyorsun hep.

Link to comment
Share on other sites

INIFile.SetValue("AutoPlay\\Docs\\data.ini", "Dosya", "Konum"..i,Konum.Filename..Konum.Extension");

 

Bununla değiştir kodlamalarda çift tırnakları hatalı kullanıyorsun hep.

 

yazdırdı ama nerede olduğunu yazdırmadı  :mellow:

 

[Dosya]
Konum1=CONFIG.TXT
Konum2=Desktop.7z

 

 

""..Konum.Filename..""

 

Bu şekilde değişken vs. kullananları çok gördüm. Bu şekilde yanlış bir kullanımı nereden nasıl öğrendiler bilmiyorum. Bir çok kullanıcıda rastladım buna. Yapmayın arkadaşlar.

bunu ben yazmadım, .ini ye birden fazla dosya kaydedemedim, birinden yardım istedim ve oda böyle yap dedi 

Link to comment
Share on other sites

  • Editor
Konum.Filename..Konum.Extension

Çünkü burada sadece dosya adı ve uzantıyı yazdırsın dedik.

 

Konum.Drive..Konum.Folder..Konum.Filename..Konum.Extension

Biraz help dosyasından String.SplithPath komutunu incele.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...