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

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:
  #1  
Old December 31st, 2003, 02:13 PM
Newman_SCO Newman_SCO is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 28 Newman_SCO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 51 m
Reputation Power: 0
Arrow VB Shell command help. A one liner...

Could you tell me how to properly represent "strFullPath" and "strFullPath2" in this line.


Shell "strFullPath -b strFullPath2 " & name1.Text & " " & message1.Text


The 2 strFullPath's are directory paths.

Any help would be fantastic.


oh and have a happy new years.

Reply With Quote
  #2  
Old January 1st, 2004, 12:44 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
U can make these command line into a bat file,like it:
1.new a file with expanded filename is ".bat".
2.input your command line into the bat file as file's content
3.call shell function with the bat filepath as the parameter!
Or u can use shellex function to shell external command and paramter..To visit www.allapi.net for get it's detail!!..

Reply With Quote
  #3  
Old January 1st, 2004, 09:35 AM
Newman_SCO Newman_SCO is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 28 Newman_SCO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 51 m
Reputation Power: 0
Thanks for the suggestions.

But strFullPath and strFullPath2 are variables and the "-b" is a switch.


When ever the variable is changed I need it to carry out the full command.


Shell "strFullPath -b strFullPath2 " & name1.Text & " " & message1.Text

would be. for example.

#: C:\dir\program.exe -b C:\dir2\file.txt Jill hello

Is what I am wanting impossible? Putting variables in the shell command?

Thanks

Reply With Quote
  #4  
Old January 1st, 2004, 07:32 PM
Fisherman's Avatar
Fisherman Fisherman is offline
Inherits Programmer.Slacker
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Aug 2003
Location: Between my Id and your Ego
Posts: 2,194 Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level)Fisherman User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 1 Week 1 Day 13 h 57 m 53 sec
Reputation Power: 142
Send a message via ICQ to Fisherman Send a message via AIM to Fisherman
I don't know what you are meaning by "representing" them, but it seems that this would be appropriate

Code:
Shell strFullPath  & " -b" &  strFullPath2 & " " & name1.Text & " " & message1.Text

Reply With Quote
  #5  
Old January 1st, 2004, 07:51 PM
Newman_SCO Newman_SCO is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Posts: 28 Newman_SCO User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 51 m
Reputation Power: 0
Fisherman you are Brilliant!

All evening I have been fighting this.


Your line was pretty much perfect except "1" space.


I really do appreciate it mate!

Thank you!!

Reply With Quote
  #6  
Old January 1st, 2004, 09:50 PM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
Easy way And trouble write mistake...Great!I didn't find the wrong fisherman found..:-)

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > VB Shell command help. A one liner...


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

 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT