Other Programming Languages
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreOther Programming Languages

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old March 9th, 2008, 11:51 AM
Chase Chase is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2008
Posts: 1 Chase User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 13 m 52 sec
Reputation Power: 0
Unhappy General - Issues with batch programming and pipes

Although I've mainly used high-level languages in the past, I felt the urge to do something very basic - writing Windows Batch files. And indeed, that proves quite useful. But right now there's something I don't get. Using the | character, you use a pipe to send the output of one program to the input of another. Very un-Windows-like, at least. This works perfectly:
Code:
echo 03-09-08 | date

the date command expects a new date in this format, and that's what i supply.
Somehow, this doesn't work:
Code:
cd | set /p folder=

"set /p VARNAME=" prompts for a value to assign to VARNAME, and I'd like to set the current directory. It refuses to work.
For some strange reason, this works:
Code:
cd > tmp
set /p folder= < tmp


I hope someone is experienced with this, and can help me out!

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreOther Programming Languages > General - Issues with batch programming and pipes


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway