Results 1 to 2 of 2

Thread: copying - please help!

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    my problem - i read from the file FromFile. i convert the text there its ASCII value and write the ASCII value back to ToFile.

    The problem is i want to convert the spaces in the text file to their ACSII values too (space = 32), not just the letters! PLEASE HELP!


    here is my code:

    Code:
    
    
    Open FromFile For Binary As #1
    Open ToFile For Binary As #2
    
    For LoopControl = 1 To BufferCount
    Get #1, , InByte
    Dim ToFile
    Dim FromFile
    
    FileSize = FileLen(FromFile)
    BufferCount = FileSize / 1
    
    
    InByte2 = Asc(InByte) 
    
    Put #2, , InByte2
    
    Next LoopControl
    
    Close #1
    Close #2
    thanks in advance for your help
    ______________

  2. #2
    Fanatic Member
    Join Date
    Feb 2000
    Location
    Dunmow,Essex,England
    Posts
    898

    Cool

    Hi,

    You could just do a test and wrap it.

    i.e. if inbyte2 = 32 then inbyte2 = " "

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width