C
cornedbeef007-groups@yahoo.com.au
Flightless Bird
I have an application to image my hard disk partitions. I can run the
application from commandline, specifying, among othjer options, the
partition to target, and the location and name of the output image
file.
Here's what I want to do.
List all the existing image files in the output path.
They will be in the format C_Drive-001.tbi, and C_Drive-002.tbi etc.
I want to find the seqence number of the last file, and use it to
generate the filename for the next file. In this case it will be
C_Drive-003.tbi.
On the succesfull completion of the image, then delete the oldest
image file, leaving 2 files there.
I will then run this script as a scheduled task to regularly image my
system.
So I need to know, how to parse the output of a DIR C_Drive*.tbi /o-D /
b to find the seqence number of the current image file, and then pass
that to the next line which executes the image program.
Any ideas?
Thanks.
application from commandline, specifying, among othjer options, the
partition to target, and the location and name of the output image
file.
Here's what I want to do.
List all the existing image files in the output path.
They will be in the format C_Drive-001.tbi, and C_Drive-002.tbi etc.
I want to find the seqence number of the last file, and use it to
generate the filename for the next file. In this case it will be
C_Drive-003.tbi.
On the succesfull completion of the image, then delete the oldest
image file, leaving 2 files there.
I will then run this script as a scheduled task to regularly image my
system.
So I need to know, how to parse the output of a DIR C_Drive*.tbi /o-D /
b to find the seqence number of the current image file, and then pass
that to the next line which executes the image program.
Any ideas?
Thanks.