--- In [email protected], "kottami" <[EMAIL PROTECTED]> wrote:
> Hi..
> 
> I want to rename files...
> 
> abcde.txt ---> aPbPcPdPe.txt
> ¿ì¸®³ª¶ó.txt --> ¿ìP¸®P³ªP¶ó.txt -- It's Korean.
> 
> d:\file2.txt
> abcde.txt
> 12345.txt
> ¿ì¸®³ª¶ó.txt
> abc
> ---------------------------------------------------------
> FOR (iCount = 1 ; iCount <= 100 ; iCount = iCount + 1)
> 
> wait.for(400)
> s=readline("d:/file2.txt",icount)
> WAIT.for(50)
> 
> IF (LENGTH(S) == 3)
> quit
> wait.for(40)
> clip.clearrecent
> wait.for(50)
> LOCAL nname=""
> LOCAL oname=S
> wait.for(40)
> FOR (LCOUNT = 1 ; LCOUNT <= (LENGTH(ONAME) - 5) ; LCOUNT = LCOUNT +1)
> wait.for(40)
> nname = nname ++ select(oname,lcount, lcount) ++ "P"
> wait.for(40)
> ;;WIN.DEBUG(NNAME)
> IF (CTRL == 1)
> QUIT
> endfor
> 
> ;;file.rename(oname,nname)
> PATHVAR = "D:/"
> nname = nname ++ select(oname,lcount, lcount)++select
> (oname,lcount+1, lcount+4)
> ;;WIN.DEBUG(NNAME)
> file.rename(PATHVAR++oname,PATHVAR++nname)
> 
> endfor
> -----------------------------------------
> 
> abcde.txt ---> aPbPcPdPe.txt -- GOOD
> 
> BUT
> ¿ì¸®³ª¶ó.txt --> ¿ìP¸®P³ªP¶ó.txt -- It's Korean.
> This case is not work.
> 
> Another effective method, or Tip ...

You have neglected the fact that Korean is a double-byte word. For
example, ¿ì¸®³ª¶ó is actually in 8 bytes, not 4 bytes.




Attention: PowerPro's Web site has moved: http://www.ppro.org 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to