Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: zVariables for batch files  (Read 4092 times)

0 Members and 1 Guest are viewing this topic.

Javier Hernández Ménde

  • Guest
zVariables for batch files
« on: September 06, 2004, 05:27:23 PM »
 :)Please if someone could explain me how to use variables for doing batch files.
I have looked for something but doesn´t work.
I would really tank your help.

franksimari

  • Guest
Re: zVariables for batch files
« Reply #1 on: November 29, 2004, 08:59:42 PM »
too broad a topic!!

the *.* is a variable

dir *.*   lists the current directory

dir  *.* /s  lists the content of the current directory and the contents of all the sub directories   in this case the /s is called a switch

dir /w  lists all the files and folders in a directory but not the files in the subfolders

dir /w/p  does the same as above except a page at a time


dir  b ? ? ? ? ? ? ?.r?s  seeks filenames beginning with b and the extension must begin with r , any middle letter and end with s

is this the sort of thing for which you are looking? :-*

MalikTous

  • Guest
Re: zVariables for batch files
« Reply #2 on: November 30, 2004, 10:02:55 AM »
Batch file is called with command:

math 21 3 5 7

File is:

print ( %1 / %2 - %3 ) * %4

Output is:

print (21 / 3 - 5) * 7
14


Parameters %0 through %9 are the command line calling the batch file, %0 is the batch file name, %1 and later are separated from it and each other by a space.