Timo N.
Timo N.

Reputation: 361

Problems understanding simple Batch commands

i do understand that this code puts data from a server into a certain folder called IMS_DUMP_800: it deletes everything inside and then puts the data into it.

What i dont understand is the CD.. and pause afterwards.

Is it so the order is executed well?

Also what is the projectRevision=FS_0G0A3_010_800_23 code part doing?

cd IMS_DUMP_800
del *.*
Rem: comand output file name      host/port                    projectbuild unit  
si report --basename=GIF800_0l0 --hostname=ims-es --port=7001--project="/ES/FS/0G/0A3/pis/0l0/project.pj" --projectRevision=FS_0G0A3_0l0_800_23
si report --basename=GIF800_0m0 --hostname=ims-es --port=7001 --project="/ES/FS/0G/0A3/pis/0m0/project.pj" --projectRevision=FS_0G0A3_0m0_800_23
si report --basename=GIF800_0u0 --hostname=ims-es --port=7001 --project="/ES/FS/0G/0A3/pis/0u0/project.pj" --projectRevision=FS_0G0A3_0u0_800_23
si report --basename=GIF800_ec0 --hostname=ims-es --port=7001 --project="/ES/FS/0G/0A3/pis/ec0/project.pj" --projectRevision=FS_0G0A3_ec0_800_23
si report --basename=GIF800_sc0 --hostname=ims-es --port=7001 --project="/ES/FS/0G/0A3/pis/sc0/project.pj" --projectRevision=FS_0G0A3_sc0_800_23
si report --basename=GIF800_ws0 --hostname=ims-es --port=7001 --project="/ES/FS/0G/0A3/pis/ws0/project.pj" --projectRevision=FS_0G0A3_ws0_800_23
si report --basename=GIF800_xc0 --hostname=ims-es --port=7001 --project="/ES/FS/0G/0A3/pis/xc0/project.pj" --projectRevision=FS_0G0A3_xc0_800_23

CD ..

pause

Upvotes: 0

Views: 34

Answers (1)

RB.
RB.

Reputation: 37192

The CD.. is to reverse the effect of the CD IMS_DUMP_800 and leave you in the folder you started in.

This can be better achieved with pushd and popd.

The PAUSE is to ensure the user has to take an action to end the script. This permits the user to double-click the script, wait for it to complete, and not have the command-window automatically close when the script ends (permitting them to see any error messages, etc).

As for the last question - I don't know. si is not a standard command, so you would need to refer to the documentation for that executable.

Upvotes: 1

Related Questions