Output files and characters? (Batch files)

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
ahbaker
Posts: 1
Joined: 04 Oct 2013 19:42

Output files and characters? (Batch files)

#1 Post by ahbaker » 04 Oct 2013 19:56

Hey guys, found this forum through google.

Basically, I'm taking an Intro to OS class and it's the conclusion of DOS week. Our homework calls for us to "create a output file using >" and also to "explain how a output character can be used to log activity in a batch file."

The problem is, this information isn't noted in our textbook, or mentioned in our resources and as a result, I'm kind of :!: :shock: :oops: :| :?: lost.

I do searches on google and can't seem to find anything directly referring to what the heck a "output file" or "output character" is. I'm not asking any one to do my homework here, I'm just stumped and desperate for a clue. Maybe a link, or if the terms are interchangeable with anything else, I'm sure I could go fish for more information.

Any help would be appreciated. Thanks in advance.

foxidrive
Expert
Posts: 6031
Joined: 10 Feb 2012 02:20

Re: Output files and characters? (Batch files)

#2 Post by foxidrive » 05 Oct 2013 04:11

Edited: to correct typo:

An "output file" in this context is an ordinary text file that text is redirected into.

The > and >> redirection characters are used to place text into a file that is generated from an exe/utility/command.

Try this command in a cmd window and examine the file.txt on your desktop:

Code: Select all

dir "%userprofile%\desktop" /b /a-d  >"%userprofile%\desktop\file.txt"

Post Reply