home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.comp.os.windows-xp      Actually wasn't too bad for a M$-OS      17,273 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 16,849 of 17,273   
   VanguardLH to Frank Slootweg   
   Re: piping / redirecting into a vbs scri   
   24 Apr 24 13:59:54   
   
   XPost: alt.windows7.general   
   From: V@nguard.LH   
      
   Frank Slootweg  wrote:   
      
   >   FTR, AFAICT he does *not* "want files themselves to do reads and   
   > writes of other files". (I think) That's your misunderstanding. The   
   > 'files' are not "data objects", but a VBScript (myvbscript[.vbs]), i.e.   
   > it *is* a program. That's clear by the fact that the .vbs file *is*   
   > executed.   
      
   VBScript is an interpreted language, not a compiled one.   
      
   .vbs are text files.  That they contain scripts is only useful when they   
   are read by an interpreter.  .vbs files are not executable.  They are   
   read by an interpreter that does the code execution.  You can compile   
   .vbs files, like after porting to VB or VB.NET and then *compiling* the   
   script) into .exe files, but then they are .exe files, not .vbs text   
   files describing a script.   
      
   He wants to pipe or redirect files into files, like:   
      
   textfile1 | textfile2   
   textfile2 < textfile1   
      
   He discovered the solution was to specify the .vbs extension on the   
   filename to get that handler to read the text file to run the script.   
      
   >   I don't know how a .vbs file gets executed, but I assume it works like   
   > .exe and .bat files that the command interpreter (cmd.exe) sees that   
   > myvbscript is actually myvbscript.vbs and hence calls wscript.exe to   
   > execute myvbscript.vbs.   
      
   Batch (.bat) files are just text files, too.  They are not executable.   
   They must get interpreted by cmd.exe.  Likewise, the filetype   
   association on .bat has the text file read into command shell to do the   
   interpretation of the script.   
      
   Personally I wouldn't rely on filetype association hoping the handler   
   gets loaded at the right time to load the text file to run the script   
   and generate the stdin, stdout, and stderr streams.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca