Forum     

Go Back   Digit Technology Discussion Forum > Portables, Peripherals and Electronics > QnA (read only)
Register FAQ Calendar Mark Forums Read

QnA (read only) Mods please help transfer the contents of this forum to proper sections. :)


 
 
LinkBack Thread Tools Search this Thread Display Modes
Old 05-08-2006, 05:17 AM   #1 (permalink)
Broken In
 
Join Date: Oct 2003
Location: France
Posts: 137
Default Command line help


here is what i wanna do and some how all in command prompt..

1. search for a file (dir filename.ext /s /b)
this gives output in the form of absolute path including the filename and no other crap e.g. c:\Program Files\wherever\filename.ext

now i wanna use the path(s) obtained above to view the content...
any ideas on how to do it??
i read DOS for dummies a long time back and there was some implementation..

actually i want to store all the command in a batch file and route the display (type ) to another file, all in the background...

thanks
Hitesh Gupta
__________________
There are only 10 type of people in world...
1 who understand binary..
&
1 who don't
hitesh_hg is offline  
Advertisements. Register and be a member of the community to get rid of them.
Advertisement

Old 05-08-2006, 07:44 AM   #2 (permalink)
I see right through you.
 
Sykora's Avatar
 
Join Date: Sep 2005
Location: Chennai
Posts: 597
Default Re: Command line help

You have to pipe it.

Code:
dir filename.ext /s /b | <whatever you want to do with the files>
You send the output of the first operation through the pipe to the second operation.
__________________
I didn't make the world, I only try to live in it.
http://lucentbeing.com
-- Sykora --
Sykora is offline  
Old 05-08-2006, 08:02 PM   #3 (permalink)
-The BlacKCoaT Operative-
 
Rollercoaster's Avatar
 
Join Date: Mar 2005
Location: Dehradun, India
Posts: 1,205
Default Re: Command line help

do u want to view the contents of the filename.ext or the containing directory c:\Program Files\wherever\ ?


--to save the output of the command use "dir filename.ext /s /b > output.txt"
this will save all the output into the text file "output.txt"

you will have to use some kind of loops... try googling "dos loops"
__________________
--------------------------------------------
Holding my last breath, safe inside myself.....
--------------------------------------------
I dont use my computer. I misuse it- रोलरकोस्टर

Last edited by Rollercoaster; 05-08-2006 at 08:07 PM.
Rollercoaster is offline  
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


 
Latest Threads
- by Charan
- by clinton
- by icebags
- by ico
- by gohan89

Advertisement




All times are GMT +5.5. The time now is 11:11 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.

Search Engine Optimization by vBSEO 3.3.2