Results 1 to 3 of 3

Thread: adding numbers...i cant add

  1. #1
    InternalError
    Guest

    adding numbers...i cant add

    hey, I have this prob, I'm making an app that renames file and the files are name abc-001s.jpg, abc-002s.jpg, etc. So this is what i have:


    Dim a as string

    a = "001"

    do:
    filecopy "A:\abc-" & a & "s.jpg", "A:\" & text1.text & ".jpg"
    a = a + 1



    it makes a turn to 2 when it adds it. so what can i do??!?!?!

  2. #2
    PowerPoster
    Join Date
    Jul 1999
    Posts
    5,923

    Re: adding numbers...i cant add

    Originally posted by InternalError
    it makes a turn to 2 when it adds it. so what can i do??!?!?!
    Isn't that what you want?

  3. #3
    PowerPoster Static's Avatar
    Join Date
    Oct 2000
    Location
    Rochester, NY
    Posts
    9,390
    i think he means ..its 2 instead of 002

    try this:
    VB Code:
    1. a = 1
    2. Do:
    3. FileNm = "abc-" & Format(a, "000") & "s.jpg"
    4. Filecopy "A:\" & FileNm , "A:\" & text1.text & ".jpg"
    5. a = a + 1
    JPnyc rocks!! (Just ask him!)
    If u have your answer please go to the thread tools and click "Mark Thread Resolved"

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