Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Beginning VB 6 For coders who are new to Visual Basic, working in VB version 6 (not .NET).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Beginning VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old April 13th, 2006, 12:15 AM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Default passing a DOS command

hi ...
can I pass a DOS command in Shell function (or any other function), i.e., "COPY abc.txt D:" ... As it iz possible by using Shell command in earlier versions of Basic, i.e., QBasic, etc

  #2 (permalink)  
Old April 13th, 2006, 01:52 AM
Authorized User
 
Join Date: Mar 2006
Location: Bratislava, , Slovakia.
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, of course
Peko

  #3 (permalink)  
Old April 13th, 2006, 08:06 AM
Authorized User
 
Join Date: Aug 2005
Location: , , .
Posts: 64
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hey ... thankz alot 4 ur prompt reply
could u plz do me a favor ... plz tell me how 2 do this, N plz write a small piece of code 4 me
actually i m new in this field, could u plz guide me a bit ... i'll b thankful 2 u

i'll w8 4 a good reply

  #4 (permalink)  
Old April 27th, 2006, 02:19 AM
Authorized User
 
Join Date: Mar 2006
Location: Bratislava, , Slovakia.
Posts: 80
Thanks: 0
Thanked 0 Times in 0 Posts
Default

VB has Shell Command:
Function Shell(PathName, [WindowStyle As VbAppWinStyle = vbMinimizedFocus]) As Double
for deatil information see Help.

using:
Shell "COPY abc.txt D:\xx\abc.txt"
or
a = Shell("COPY abc.txt D:\xx\abc.txt")

Peko



Similar Threads
Thread Thread Starter Forum Replies Last Post
Dos command from Java application javaean Java Basics 2 October 1st, 2006 07:30 AM
Dos command eortiz1 BOOK: Beginning Visual Basic 2005 Databases ISBN: 978-0-7645-8894-5 0 May 11th, 2006 03:38 PM
passing command line parameters to xsl rameshnarayan XSLT 4 August 3rd, 2005 06:21 AM
Running DOS Command using VB vmaruv VB How-To 3 February 8th, 2005 05:32 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.