There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
acer audio black screen boot bsod computer connection crash css dell display driver drivers email error excel explorer firefox firefox 3 game hard drive internet internet explorer itunes laptop lcd linux malware network networking nvidia outlook outlook 2003 outlook express partition printer problem ram router slow sound trojan usb video virus vista windows windows vista windows xp wireless
DOS/PDA/Other
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Operating Systems > DOS/PDA/Other >
Solved: How to open a text file


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

Closed Thread
 
Thread Tools
screamoon's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2006
Experience: Beginner
19-Jul-2006, 01:24 PM #1
Solved: How to open a text file
Hi,

I am trying to make a batch script that would open a text file and then read it's contents. Is there a direct command to do that in batch ?

Any help would be appreciated

Thanking you
scream
StumpedTechy's Avatar
Distinguished Member with 6,142 posts.
 
Join Date: Jul 2004
Location: Central Florida
Experience: Advanced
19-Jul-2006, 01:55 PM #2
You mean read as in audio out of the speakers? Or read as in parsing out the information for futher use in the batch file?
screamoon's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2006
Experience: Beginner
20-Jul-2006, 05:15 AM #3
What I mean is suppose I have a text file with some file names.......I want to read the contents of the text file ( which would be some file names) and then compare those names with the files stored in some folder. I would be comparing by names......


Please help

Thank you
screamoon's Avatar
Junior Member with 15 posts.
 
Join Date: Jul 2006
Experience: Beginner
20-Jul-2006, 05:47 AM #4
@echo off
for /f %%a in (Files.txt) do attrib +h Output\%%a
del Output\*.*
for /f %%a in (Files.txt) do attrib -h Output\%%a


This is the script I am using but I am not getting the desired output. Please help me in debugging this issue.

For more information on my issue check my post called " Deleting Files Through Batch"

THank you..
StumpedTechy's Avatar
Distinguished Member with 6,142 posts.
 
Join Date: Jul 2004
Location: Central Florida
Experience: Advanced
20-Jul-2006, 09:29 AM #5
Do the file names in the text file have long names? or are they 8.3 compliant? Also do you have the .3 portion of the filename in ther e or is it going against just partial file names?
Squashman's Avatar
Distinguished Member with 12,698 posts.
 
Join Date: Apr 2003
Location: 1265 Lombardi Ave
21-Jul-2006, 07:21 PM #6
Whtat about using the good ole Type command.
squidboy's Avatar
Computer Specs
Senior Member with 409 posts.
 
Join Date: Dec 2004
Location: Long Island, NY
Experience: Cheese makes my mouse wor
21-Jul-2006, 07:45 PM #7
Quote:
Originally Posted by screamoon
@echo off
for /f %%a in (Files.txt) do attrib +h Output\%%a
del Output\*.*
for /f %%a in (Files.txt) do attrib -h Output\%%a


This is the script I am using but I am not getting the desired output. Please help me in debugging this issue.

For more information on my issue check my post called " Deleting Files Through Batch"

THank you..
If I read this correctly, you want to hide every file name that matches, then delete all the rest, then unhide them. Is that correct?
Closed Thread

THIS THREAD HAS EXPIRED.
Are you having the same problem? We have volunteers ready to answer your question, but first you'll have to join for free. Need help getting started? Check out our Welcome Guide.


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
WELCOME TO TECH SUPPORT GUY! Are you looking for the solution to your computer problem? Join our site today to ask your question -- for free! Our site is run completely by volunteers who help people like you solve computer problems. See our Welcome Guide to get started.



Thread Tools


You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 03:24 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.