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

Author Topic: New to DOS Help!  (Read 2178 times)

0 Members and 1 Guest are viewing this topic.

dwatki19

  • Guest
New to DOS Help!
« on: January 09, 2007, 06:27:01 AM »
I have some very basic questions i hope you can help!

I have this line of code:-

for /F %%k in ('dir /b*.cgm') do set FILENAME=%%nk.cgm

what are, and where can i find a description of:-
1. /F
2. /b
3. k
4. nk

Cheers For the help


Dan

gpl



    Apprentice
  • Thanked: 27
    Re: New to DOS Help!
    « Reply #1 on: January 09, 2007, 07:26:28 AM »
    for /F %%k in ('dir /b*.cgm') do set FILENAME=%%~nk.cgm
     
    what are, and where can i find a description of:-
    1. /F : process each line in the file (or command output)
    2. /b : only output filename in dir command
    3. k : a loop variable
    4. ~n : note the squiggle, means get just the name part of the filename held in variable k

    Does this help?
    Graham

    DosItHelp



      Intermediate
      Re: New to DOS Help!
      « Reply #2 on: January 10, 2007, 06:23:12 PM »
      Or at a command line type: for /?
      Or look here for the same: http://www.dostips.com/DosCommandRef.htm#FOR
       ;)


      « Last Edit: January 10, 2007, 06:23:32 PM by DosItHelp »