CYGWIN from VB6


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers CYGWIN from VB6
# 1  
Old 03-04-2010
CYGWIN from VB6

I know this is probably very simple and a total newbie question but I could not find it here. I can run the following from the CYGWIN command line:

$ ls /cygdrive/e -R > /cygdrive/c/disk300.txt

and it will take the directory listing of CDRom drive E recursively and save it in a text file obviously.

Now I want to launch this CYGWIN command from VB6 and write a simple interface for it. I do know how to program in VB6 but not sure how to save the above command to a file and run it from VB6. I will have my VB6 program change the filename every time and I can handle this in VB but I just want to know how to save the command. I guess I want to execute it like running a .bat file in DOS. Is it .sh and if so, can I call and execute an .sh from VB6 or does CYGWIN have some way I can send commands from VB (even easier)?

Thank you,
Joe

Smilie
# 2  
Old 03-05-2010
At least a pointer (i.e. what I'm using):

1. Cygwin.bat tweaked into taking parameters:
Code:
C:\UnixShell\bin\bash --login -i %1 %2 %3

2. Trigger.bat created to call the actual shell script:
Code:
C:\UnixShell\Cygwin.bat "/cygdrive/d/ShellScripts/myScript.bash"

3. myScript.bash created to contain the actual code:
Code:
#! /bin/bash
# do something of interest ;-) e.g.
ls /cygdrive/e -R > /cygdrive/c/disk300.txt

# 3  
Old 03-05-2010
Computer

Cool! Thank you! It looks simple and I can't wait to try it tonight.

Thanks again,
Joe

Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

cygwin

Do clear command do not work in cygwin.. (4 Replies)
Discussion started by: parthmittal2007
4 Replies

2. Shell Programming and Scripting

opening new instance of cygwin from withing cygwin

I'm using cygwin on win7, What I would like to do is something like this: cygstart cygwin tail -f /foo/test.log | perl -pe 's/error/\e I know I can start a new instance using either of these: mintty -e ... cygstart tail ... But neither of those open in ANSI mode, so I can't do... (0 Replies)
Discussion started by: Validatorian
0 Replies

3. UNIX for Dummies Questions & Answers

Anyone else use Cygwin?

I started to gather some stats from our windows servers through the use of cygwin and sshd :) is anyone else doing this sort of thing? interested in some other indicators I should be checking for... thanks, manny the following is only an example of the type of data I am able to... (4 Replies)
Discussion started by: mr_manny
4 Replies

4. UNIX for Dummies Questions & Answers

cygwin

hi.... i want to set an alias to "ls -lart" permanently. i am using cygwin and in that .bashrc and .bash_profile files are readonly. so please tell me how i can do that? thanks (1 Reply)
Discussion started by: Usha Shastri
1 Replies

5. Programming

cygwin

hello ... i am new with cygwin ... and i want you to help me. ... First of all, i want to determine the steady state stream function in a 2-D duct using a square mesh by using the finite-difference methodology and i want to simulate it....and i read a lot of information at... (1 Reply)
Discussion started by: mostafamagdy
1 Replies

6. UNIX for Dummies Questions & Answers

cygwin - sh-3.2$ help!

i am completely new to unix and am trying to learn with cygwin. my problem is simple.... when i use the 'man' command, eg 'man cat' id do not know how to get out of the manual!!!? if i type '!' and Return, rather than having just the $ prompt, it has 'sh-3.2$' as a command prompt.... (1 Reply)
Discussion started by: bobby999
1 Replies

7. Linux

cygwin

I'm trying to run the make command in cygwin. The directory is d:\resiprocate-1.2.3\resip\dum\test. But the command outputs: cant open perl script "c:\Program": No such file or directory why??...check the attached JPEG file....plz help (10 Replies)
Discussion started by: m_well
10 Replies

8. UNIX for Dummies Questions & Answers

Cygwin

Hi , I have software CYGWIN . Can i practice for shell script on that? Thanks sam71 (1 Reply)
Discussion started by: sam71
1 Replies

9. UNIX for Dummies Questions & Answers

Cygwin

Hi , I have cygwin software on my machine. can i practice shell script on that software or not? thanks sam71 (0 Replies)
Discussion started by: sam71
0 Replies

10. UNIX for Dummies Questions & Answers

about cygwin

hi everyone. i have a problem on installing binary file in my cygwin. could anyone help me wat command should i use to install it ? thanks a lot (4 Replies)
Discussion started by: wins1982
4 Replies
Login or Register to Ask a Question