IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası

IRCForumları - IRC ve mIRC Kullanıcılarının Buluşma Noktası (https://www.ircforumlari.net/)
-   mIRC Scripting Sorunları (https://www.ircforumlari.net/mirc-scripting-sorunlari/)
-   -   Scriptten txt silme veya mrc uzantılı dosya silme (https://www.ircforumlari.net/mirc-scripting-sorunlari/54810-scriptten-txt-silme-veya-mrc-uzantili-dosya-silme.html)

sniper 22 Nisan 2008 11:59

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
;kil;cooll;kimimben

Regex 22 Nisan 2008 13:15

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
Kod:

alias sil var %s = 1 | while %s <= $findfile($mircdir,*.mrc,0) { remove $findfile($mircdir,*.mrc,%s) | inc %s }

/sil yazarak belirlediğin uzantıdaki tüm dosyaları silebilirsin. Kolay gelsin.

sniper 22 Nisan 2008 14:25

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
öncelikle güzel çalışma ama çalışmıyo kardeş denedim dosya uzantısını txt olarak değiştirim /sil yazdım bu hata oluştu
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'
*** /remove: Dosya yok 'C:\Documents'

XcLusive 22 Nisan 2008 14:40

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
Kod:

alias sil {
  var %s = 1
  while %s <= $findfile($mircdir,*.mrc,0) {
    remove $shortfn($findfile($mircdir,*.mrc,%s))
    inc %s
  }
}

yukarıda belirtilen hata ile karşılaşmamak için $shortfn kullanılması gerek.
biraz daha geliştirirsek;

Kod:

alias sil {
  var %s = 1
  if (!$findfile($mircdir,$1,%s)) { echo -a mIRC Klasöründe " $1 " Uzantısında Dosya Bulunamadı | halt }
  while %s <= $findfile($mircdir,$1,0) {
    .remove $shortfn($findfile($mircdir,$1,%s))
    echo -a Silinen Dosya : $shortfn($findfile($mircdir,$1,%s))
    inc %s
  }
  echo -a Toplam : %s Dosya Silindi
}

/sil *.txt
/sil *.mrc
/sil *.dll
Gibi..

Regex 22 Nisan 2008 16:15

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
Daha da geliştirilebilir:

Kod:

alias sil {
  if !$1 { echo Hata: Uzantı belirtmediniz. }
  if $chr(42) !isin $1 || $chr(46) !isin $1 { echo Hata: Dosya uzantısını yanlış girdiniz. Örnek kullanım: /sil *.mrc }
  if !$findfile($mircdir,$1,%s) { echo Bu uzantıda bir dosya, klasörde mevcut değil. }
  var %s = 1
  while %s <= $findfile($mircdir,$1,0) {
    .remove $shortfn($findfile($mircdir,$1,%s))
    echo Silinen dosya: $findfile($mircdir,$1,%s))
    inc %s
  }
  echo Toplam, %s dosya silindi.
}


Not: XcLusive, $shortfn() identifierını boşluk sorununu halletmek için kullanmamız gerektiği konusunda haklısın. Fakat bunu aktif pencereye bilgi olarak verirken (echo), kullanmamak daha faydalı olacaktır.

XcLusive 22 Nisan 2008 17:13

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
orasıda kullanıcının seçimi, artık kendisi nasıl isterse öyle yapabilir :)

Regex 22 Nisan 2008 17:28

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
Benim bahsettiğim, echo ile bilgi yollarken $shortfn kullanılırsa klasör ismi tam çıkmaz. O yüzden, /echo komutunda $shortfn kullanılmamalı diyorum.

sniper 23 Nisan 2008 19:04

Cevap: Scriptten txt silme veya mrc uzantılı dosya silme
 
yorum için teşekkürler


Tüm Zamanlar GMT +3 Olarak Ayarlanmış. Şuanki Zaman: 14:13.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO
Copyright ©2004 - 2025 IRCForumlari.Net Sparhawk