Computing.Net > Forums > Programming > batch file input

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

batch file input

Reply to Message Icon

Name: djas
Date: September 15, 2004 at 08:36:23 Pacific
OS: Windows XP/Longhorn GUI
CPU/Ram: n/a
Comment:

Is it possible to input a command from a text file onto the command line in a batch file
thanx

djas



Sponsored Link
Ads by Google

Response Number 1
Name: Mechanix2Go
Date: September 15, 2004 at 08:49:37 Pacific
Reply:

Can you claify plase?

M2

Mechanix2Go@Golden-Triangle.com



0

Response Number 2
Name: djas
Date: September 15, 2004 at 09:00:58 Pacific
Reply:

say i had this in a text file:

"del 1.txt"

Is it possible to inport this into a batch file, not just being type on screen but being used as a command.
I thought maybe somthing like this:

"%input% < 1.txt"

thanx

djas


0

Response Number 3
Name: wizard-fred
Date: September 15, 2004 at 09:39:38 Pacific
Reply:

text file
a.bat contains "del 1.txt"

b.bat contains "call a" and other commands

b will execute a


0

Response Number 4
Name: djas
Date: September 15, 2004 at 09:52:21 Pacific
Reply:

i dont think you understood what i meant
i want to have .txt file with a batch file command in it on its own.
then i want a .bat file to read the .txt file and input the command onto the command line

djas


0

Response Number 5
Name: Mechanix2Go
Date: September 15, 2004 at 10:03:23 Pacific
Reply:

If it has this:

"del 1.txt"

I dunno. But if it has this:

del 1.txt

then just call it a BAT and it'll work.

M2

Mechanix2Go@Golden-Triangle.com



0

Related Posts

See More



Response Number 6
Name: wizard-fred
Date: September 15, 2004 at 10:14:22 Pacific
Reply:

The quotes was to show the contents.

A bat file is a text file.


0

Response Number 7
Name: djas
Date: September 16, 2004 at 10:35:09 Pacific
Reply:

u guys just arent getting what im trying to say,

i want to import a command from a .txt file and use it in a batch file

djas


0

Response Number 8
Name: dtech10
Date: September 18, 2004 at 15:33:07 Pacific
Reply:

Hi
Since you're using XP, is this what you want.

echo dir > test.txt

@echo off
set /p Com=<test.txt
%Com%



0

Response Number 9
Name: djas
Date: September 19, 2004 at 10:52:18 Pacific
Reply:

yes brilliant thanx thats exactly what it wanted works thanx again and everyone that tried to help
thanx

djas


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: batch file input

Batch file input for logevent.exe www.computing.net/answers/programming/batch-file-input-for-logeventexe/15380.html

Batch File|Input from txt file www.computing.net/answers/programming/batch-fileinput-from-txt-file-/17293.html

Batch File Input Shortcuts www.computing.net/answers/programming/batch-file-input-shortcuts/18478.html