Jump to content
Sign in to follow this  
PinguSpy

Perlu Bantuan.....

Recommended Posts

[er, korang rase ader atau wujud tak program yg bleh tukarkan perkataan dari file ke perkataan yg kita nak? maksud aku contoh cam nih, ader 5 buah file note pad...

setiap ke lima-lima file nih mempunyai perkataan "stupid" jadi masalahnyer cam ner aku nak buat bagi setiap perkataan stupid kat kesemua file tadi tu diubah ke pada perkataan lain contoh "1234"

maksud aku ader tak program yg cam tuh?? aku tulis perkataan yg nak diubah "stupid", pastu tulis perkataan yg nak digantikan "1234" lepastu klik run atau aper-aper jer dan target kepada file yg nak di ubah tuh! dan boom!! bila aku bukak kesemua file tuh perkataan "stupid" dah hilang dan telah digantikan dengan perkataan "1234"

masaalah nya itu kalau 5 file... beleh lah aku pakai tangan... kalau 30 000 file? patah jari aku aper nak tukar setiap satu file...!!

jadi sajer jer nak tanya kalau korang tahu lah...

tak silap aku nak buat prog nih senang kot, cuma perlu fokuskan kepada target file... dan code program yg akan mengubah serta mengantikan perkataan yg kita nak...

tapi aper kan daya aku ak expert lagi bab programming...

hrp membantu....

Share this post


Link to post
Share on other sites

bleh buat dengan cmd batch language... nanti aku test dulu..

[thank banyak2 Ancient One!!!

hrp menjadi...!

dah lebam dah jari aku... baru sempat tukar 1000 file....

er, hrp prog yang ko buat bleh support semua file hehe...

dekat sini aku rase cam bleh...

http://prdownloads.sourceforge.net/replace...ror=superb-west

tapi pening jugak nak guna...

secara jelas aku tak nampak pun fungsi dia untuk tukar semua perkataan serentak kepada semua file (cara paling panatas) ...

tapi bleh la...

dan dia tak suport file jenis HTML... suport word jer...

Edited by PinguSpy

Share this post


Link to post
Share on other sites

ni nak belajar buat dengan cmd batch language lagi ke tak ni?

[bleh gak...

tapi tak silap aku guna

command prompt pun bleh...

Share this post


Link to post
Share on other sites

Ancient One, bukan ke banyak gile limitation kalo nak gune cmd?

Share this post


Link to post
Share on other sites

limitation cam aper? kalau setakat nak ubah teks tu bleh aper. tapi memandangkan pingu dah jumpa program yang khas... takyah laa kan.. aku sendiri pon guna uestudio nyer replace in files feature... hehehe

Share this post


Link to post
Share on other sites

kalau setakat nak ubah teks tu bleh aper.

command ape kalo nak tukar? kalo setakat find.exe tu just leh carik je. atau nak kene ade file lain gak selain default toolz yang memang dari window$?

Share this post


Link to post
Share on other sites

kita bleh gunakan command for untuk proses setiap lines dalam fail, sebagai contoh. combine dengan output redirection operator... bleh aper.. aku harap ko dapat ideanya.. tapi for command yang advanced ni cuma ader dalam XP.

Share this post


Link to post
Share on other sites

as i just said before, there's alwayz a catch in scripting language (esp in batch). walaupun ade command "for".

kalo pakai delims, (contoh delim = dot, comma and space) maka dot, comma and space tu akan hilang. ya know what i mean..

example

for /f "tokens=1,2,3,4,5,6,7* delims=,. " %%a in ("some string") do (....)

and if i replace the "some string" with this:

This.is a stupid, very2 stupid example.hehe..

for akan iterate each word (berdasarkan tokens) . thus, it is really hard to RECONSTRUCT back to the original word. sebab kita tak tau kat mane character delims tu terletak secara programatically.

(sorry for bad english. i'm in my way to improve it)

Share this post


Link to post
Share on other sites

ya.. btul jugak.. lagipun camne plak nak cari kalau dalam perkataan cam "abcdefstupidhfjahs".. takleh laa.. aku cuma bacer "for" nyer documentation dan tak penah test ;).

Share this post


Link to post
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.

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.

Loading...
Sign in to follow this  

×
×
  • Create New...