|
-
October 2nd, 2007, 10:35 AM
#1
DOS - Batch question regarding leading zeros
Hello all,
I don't kow if this is a good place for this question but I couldn't find any other place to put it.
So here it goes. I'm reading a byte from a HEX file that is transformed from hexa to ascii. My input could would be 1,2 or 3 symbols as on byte is from 0 to 255. What I want is a batch script to put leading zeros to this string to always have 3 digits. So I need a transformation from 01 to 001 as example. The problem is that could be 1 or 01... so I don't know if I have to put 1 or 2 leading zeros...
Thanks!
You liked it? Please show your gratitude and rate it!
There is no 'patch' for stupidity.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|