Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

Batch program for natural to 7-digit file name conversion? (Miscellaneous)

posted by Torsten, 09.06.2017, 11:23

Dear all,

I need to transfer data between different programs. However, the names
of the files with the respective data follow different conventions:
the input uses natural numbers for files names (i.e. 1, 2 ... 999999),
whereas the target program requires seven-digit file names, with leading
zeroes (0000001, 0000002 ... 0999999, 1000000) to order them properly.

I wonder whether such conversion could be done with a batch program's
"FOR %variable IN (set) DO"-loops, or if a more complex command set is
required. Maybe with a 4DOS's .BTM batch file, or using a script
language (Perl, Java, Rexx)?

Thanks for input, Torsten

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 234 users online (0 registered, 234 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum