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.
Pass text file to DOS command
Name: rahulgupta Date: December 18, 2008 at 05:31:15 Pacific OS: Windows XP CPU/Ram: Core 2 duo Product: Don't know / DON'T KNOW
Comment:
Hi,
I have a text file having names of some folders which are dynamically gengerated in it. Now i want to pass these folder names one by one to a command written by me. How can go about it?
Name: Judago Date: December 18, 2008 at 15:38:25 Pacific
Reply:
[some of this post is reycled]
As far as I'm aware DOS can't read files without third party tools.
Do you mean scripting with windows batch script, for systems derived from windows nt? If your particular version of windows is on this list it should be possible to read plain text files using batch.
If your are using a NT based system this may do it:
for /f "usebackq delims=" %%a in ("file") do ( You command eg xcopy "%%a" "c:\newdir" /e /i )
%%a will be one line of the text file at a time.
0
Response Number 2
Name: rahulgupta Date: December 18, 2008 at 21:46:37 Pacific
Reply:
Thnx Judago,
Your code worked absolutely fine in my script. Thnx a lot.
Summary: I'm trying to import a text file to MS Access using Fixed-Width text file way ,but i wantto set field widths in (row break ) instead of (column break) the only one availbe while import is there any wa...
Summary: I have a bat file that asks for user id and password then executes FTP reading the values in a text file. How do you pass the id and password variables to the text file? bat file: Echo Off CLS set /p...