Results 1 to 4 of 4

Thread: DOS Batch Files

  1. #1

    Thread Starter
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Resolved DOS Batch Files

    Anyone remember these? I have this command that stores the date in a variable but I don't understand what exactly is going on. Can someone break it down into an idiots guide for me?

    for /f %%i in ('date /t') do (set logdate=%%i)
    Last edited by DeadEyes; Jun 10th, 2005 at 03:57 AM.

  2. #2
    Addicted Member WilliamRobinson's Avatar
    Join Date
    Feb 2005
    Posts
    219

    Re: DOS Batch Files

    hmm try windows help and support it has lots of batch commands
    Nothing is Impossible you say?......Try slamming a revolving door!

  3. #3
    Frenzied Member sciguyryan's Avatar
    Join Date
    Sep 2003
    Location
    Wales
    Posts
    1,763

    Re: DOS Batch Files

    Here is what ti means:

    for: Runs a specified command for each file in a set of files.
    set: Displays, sets, or removes Windows environment variables.
    date: Displays or sets the date.

    And I believe %%i is a variable and /f and /t are comand line switches for those parameters

    Cheers,

    RyanJ
    My Blog.

    Ryan Jones.

  4. #4

    Thread Starter
    Frenzied Member DeadEyes's Avatar
    Join Date
    Jul 2002
    Posts
    1,196

    Re: DOS Batch Files

    thanks all
    I'm such an moron; in DOS type help for

    the /f means the the 'date /t' gets treated as one cmd/item instead of two

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width