I have the following filenames in an array:
30000001.pdf
30000002.pdf
30000101.pdf
30011601.pdf
30011602.pdf
30011603.pdf
I need to:
1. Combine each filename with the same first six digits into one string.
Example:
string = "30011601.pdf 30011602.pdf 30011603.pdf"
Note: Filenames could range from xxxxxx01.pdf to xxxxxx99.pdf. Must be in numerical order with lowest number first. Separated by a space.
2. Execute a DOS command with the string.
3. Move on to the next group of filenames
How do I build the string dynamically?
30000001.pdf
30000002.pdf
30000101.pdf
30011601.pdf
30011602.pdf
30011603.pdf
I need to:
1. Combine each filename with the same first six digits into one string.
Example:
string = "30011601.pdf 30011602.pdf 30011603.pdf"
Note: Filenames could range from xxxxxx01.pdf to xxxxxx99.pdf. Must be in numerical order with lowest number first. Separated by a space.
2. Execute a DOS command with the string.
3. Move on to the next group of filenames
How do I build the string dynamically?