Jump to content

Fileopen Dialogta Secilen Dosyanın Ismini Almak?


x_files_x
 Share

Recommended Posts

Arkadaslar fileopen dialog ile sectigimiz dosyanın yolunu nasıl kesip kopyalayabiliriz,
[code]$sec = FileOpenDialog("bir rar dosyası seç",@DesktopDir&"\","Uygulama (*.exe)",3)[/code]

diyelim yol ;
C:\Documents and Settings\user\Desktop\Deneme.exe ; burdaki sadece Deneme.exe yi nasıl alıcaz?
Link to comment
Share on other sites

[codebox]Local $FileName, $FileEx, $JustFileName
Local $FileLacation = FileOpenDialog("bir rar dosyası seç", @DesktopDir & "\", "Uygulama (*.exe)", 3);.exe
If Not @error Then
$FileName = StringTrimLeft($FileLacation, StringInStr($FileLacation, "\", 0, -1)) ;Ismi
$FileEx = StringTrimLeft($FileName, StringInStr($FileName, ".", 0, -1) - 1) ;Uzantısı
If $FileEx = $FileName Then $FileEx = ""
$JustFileName = $FileName
If $FileEx <> "" Then $JustFileName = StringTrimRight($FileName, StringLen($FileEx))

MsgBox(64, "", $FileLacation & @CRLF & $FileName & @CRLF & $JustFileName & @CRLF & $FileEx)
EndIf[/codebox]

Link to comment
Share on other sites

Hazır FileOpenDialog konusu açılmışken bende şunu sormak istiyorum blue_life

FileOpenDialog ile bir kısayolu seçtiğimizde kısayolun kopyası değilde kısayolun kendisi değişecek
yani tam istediğim buna benzer bişey

[code]FileOpenDialog("Kısayol seç", @DesktopDir & "\", "Kısayol (*.lnk)", 3)
If Not @error Then
FileCreateShortcut(@UserProfileDir & "\Local Settings\Application Data\Google\Chrome\Application\chrome.exe", @DesktopDir & "\Google Chrome.lnk", "", "www.google.com.tr", "İnternet'e gider", "", "^!G", 0, @SW_MINIMIZE)
EndIf[/code]

Edited by MeHMeTBeN
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...