How to approach this

Im working on a class project and I need to create a script that would duplicate and rename my odd numbered frames rendered, and I wanted to know if anyone could give me a template with some guidelines(maybe) as to how to create it.

This would be a big help.

for ($i = 0; $i < 10; $i++) {
if ($i % 2) {
string $cmd = ("sysFile -copy \"fileName." + $i + ".iff\" \"fileName." + ($i +1) + ".iff\"\n");
print $cmd;
eval $cmd;
}
}

Duvekot, your not supposed to blurt out answers to class assignments :slight_smile: Now the learning experience is 0.

Well I do want to learn how you came with this, I will bounce this off of my teacher and I do belive she will answer my questions. Thank you. I wont abuse what you have shown me.

This is Malcolm over and out! ^_^

Well in plain english it reads:

for ($i = 0; $i < 10; $i++){To be repeated 10 times form 0 to 9

if ($i % 2) {

is the number of done repeats odd if so assemble a command:

sysFile -copy "fileName.1.iff" "fileName.2.iff"

print and execute it.

repeat

on next odd repeat the assembled commend is:

sysFile -copy "fileName.3.iff" "fileName.4.iff"

and so on. However this si probably the easiest possible code to read, tough not the most efficent code. Altough most overhead is subsummed in the slowness of your deck anyway so not going to pick it here.

In any case im writing a beginner beginner document on scripting do you wish to participate in the test crowd?

PS:
theres relly no point in making the duplicates on disk, just instruct what it is your pushing the data into to read the frames 2 times, better yet drop the framerate. Its totaly wasted time to fill the disk with duplicates. So in the end its a script to combat something else your fialing to notice. Sometimes one ends up doing that tough.