B
bobloblian
Hi:
This group has been very helpful to me before, just to let you know its
been very much appreciated
Being familiar with bash scripting in a linux environment, I recently
waded into the world of writing a bat script for windows, I needed a
way to do a customized and fairly interaction-free back up on a windows
box to a DVD burner. I discovered that nero had a command line utility
and got it working fine so that within a double click and 3 or 4
keyboard strokes, selected types of backups can be done. Very easy for
the end user, as was required, in comparison to using the nero gui
interface. But then the number of files that needed to be backed up
increased dramatically, such that I can no longer fit it all onto one
DVD. In this respect, I need that script to be able to eject the
current DVD and ask for a new one. The nero DVD burning command line
does not have an argument that allows this to happen, so I got to
poking around for another way to do this.
The best solution I can come up with for the time being is to build
into the script a variable that allows me to keep track of how much
data is about to be written at once. By copying the files to be
written to a directory, and keeping track of the size of the directory,
I would be able to stop putting files into it and write them, eject the
disc, have the user put in a new disc and press a key to trash the
directory and do the same with the next set of data. I have found a
utility called diruse that will report the size of the directory for
me, but I am unclear as to how to take the portion of the output I need
and put it into a variable.
The output of diruse is to give the size in bytes (or MB or whatever),
then the number of files, then some text. I want to just put the size
field into a variable, but I am not sure how to extract just that
number from the output. In linux, I would use the cut command, but if
such a thing exists in the dos command structure, I cannot find it.
I am hoping someone has some idea of how I might proceed here, either
by showing me how to extract something from the output of diruse, or by
showing me another path that might do the same thing. As always, any
opinions are greatfully appreciated
This group has been very helpful to me before, just to let you know its
been very much appreciated
Being familiar with bash scripting in a linux environment, I recently
waded into the world of writing a bat script for windows, I needed a
way to do a customized and fairly interaction-free back up on a windows
box to a DVD burner. I discovered that nero had a command line utility
and got it working fine so that within a double click and 3 or 4
keyboard strokes, selected types of backups can be done. Very easy for
the end user, as was required, in comparison to using the nero gui
interface. But then the number of files that needed to be backed up
increased dramatically, such that I can no longer fit it all onto one
DVD. In this respect, I need that script to be able to eject the
current DVD and ask for a new one. The nero DVD burning command line
does not have an argument that allows this to happen, so I got to
poking around for another way to do this.
The best solution I can come up with for the time being is to build
into the script a variable that allows me to keep track of how much
data is about to be written at once. By copying the files to be
written to a directory, and keeping track of the size of the directory,
I would be able to stop putting files into it and write them, eject the
disc, have the user put in a new disc and press a key to trash the
directory and do the same with the next set of data. I have found a
utility called diruse that will report the size of the directory for
me, but I am unclear as to how to take the portion of the output I need
and put it into a variable.
The output of diruse is to give the size in bytes (or MB or whatever),
then the number of files, then some text. I want to just put the size
field into a variable, but I am not sure how to extract just that
number from the output. In linux, I would use the cut command, but if
such a thing exists in the dos command structure, I cannot find it.
I am hoping someone has some idea of how I might proceed here, either
by showing me how to extract something from the output of diruse, or by
showing me another path that might do the same thing. As always, any
opinions are greatfully appreciated