Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Issue Commands To a DOS Window

Hi All,

I have a piece of archiving software that has a command line interface
(operated via a msdos command prompt) and being able to automate some
repeated tasks would have huge benefits.

I will explain how to manually complete the command in hope that someone can
give me some pointers on how I might automate the command:-

1) Open a dos command prompt
2) Navigate to the directory containing the file needed to be archived
3) Run the command from the directory

The problem I am facing is that the command cannot accept the file's
location as a paremeter and you have to select the directory.

Could the shell command be used to complete the above steps? i.e. can you
issue multiple commands to the same command prompt window?

Any help would be really great.

Ta

Andi


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Issue Commands To a DOS Window

set the default drive an directroy to the location you wish to process

chdrive "C"
chdir "C:\Myfolder"
shell ---- your command ------

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

I have a piece of archiving software that has a command line interface
(operated via a msdos command prompt) and being able to automate some
repeated tasks would have huge benefits.

I will explain how to manually complete the command in hope that someone

can
give me some pointers on how I might automate the command:-

1) Open a dos command prompt
2) Navigate to the directory containing the file needed to be archived
3) Run the command from the directory

The problem I am facing is that the command cannot accept the file's
location as a paremeter and you have to select the directory.

Could the shell command be used to complete the above steps? i.e. can you
issue multiple commands to the same command prompt window?

Any help would be really great.

Ta

Andi




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Issue Commands To a DOS Window

Thanks Tom - in Dos the command is pcli put "c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)" - how would
this be activated using the shell command.

I have tried the obvious:- shell (pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

But it all goes red in the vba editor.

"Tom Ogilvy" wrote in message
...
set the default drive an directroy to the location you wish to process

chdrive "C"
chdir "C:\Myfolder"
shell ---- your command ------

--
Regards,
Tom Ogilvy

"Andibevan" wrote in message
...
Hi All,

I have a piece of archiving software that has a command line interface
(operated via a msdos command prompt) and being able to automate some
repeated tasks would have huge benefits.

I will explain how to manually complete the command in hope that someone

can
give me some pointers on how I might automate the command:-

1) Open a dos command prompt
2) Navigate to the directory containing the file needed to be archived
3) Run the command from the directory

The problem I am facing is that the command cannot accept the file's
location as a paremeter and you have to select the directory.

Could the shell command be used to complete the above steps? i.e. can you
issue multiple commands to the same command prompt window?

Any help would be really great.

Ta

Andi





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Issue Commands To a DOS Window

Shell requires a string argument double-up on double quotes embedded in the
string.

"pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

or set it to a variable:

s = _
"pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

Shell(s)

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Thanks Tom - in Dos the command is pcli put "c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)" - how would
this be activated using the shell command.

I have tried the obvious:- shell (pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

But it all goes red in the vba editor.

"Tom Ogilvy" wrote in message
...
set the default drive an directroy to the location you wish to process

chdrive "C"
chdir "C:\Myfolder"
shell ---- your command ------

--
Regards,
Tom Ogilvy

"Andibevan" wrote in

message
...
Hi All,

I have a piece of archiving software that has a command line interface
(operated via a msdos command prompt) and being able to automate some
repeated tasks would have huge benefits.

I will explain how to manually complete the command in hope that someone

can
give me some pointers on how I might automate the command:-

1) Open a dos command prompt
2) Navigate to the directory containing the file needed to be archived
3) Run the command from the directory

The problem I am facing is that the command cannot accept the file's
location as a paremeter and you have to select the directory.

Could the shell command be used to complete the above steps? i.e. can

you
issue multiple commands to the same command prompt window?

Any help would be really great.

Ta

Andi







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Issue Commands To a DOS Window

Thanks for explaining why the double quotes are needed - hopefully that
should reduce the chance of me repeating this mistake.

"Tom Ogilvy" wrote in message
...
Shell requires a string argument double-up on double quotes embedded in the
string.

"pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

or set it to a variable:

s = _
"pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

Shell(s)

--
Regards,
Tom Ogilvy


"Andibevan" wrote in message
...
Thanks Tom - in Dos the command is pcli put "c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)" - how would
this be activated using the shell command.

I have tried the obvious:- shell (pcli put ""c:\Program
Files\PVCS\vm\common\sampledb\archives\checkers\se rver(*.*)"")

But it all goes red in the vba editor.

"Tom Ogilvy" wrote in message
...
set the default drive an directroy to the location you wish to process

chdrive "C"
chdir "C:\Myfolder"
shell ---- your command ------

--
Regards,
Tom Ogilvy

"Andibevan" wrote in

message
...
Hi All,

I have a piece of archiving software that has a command line interface
(operated via a msdos command prompt) and being able to automate some
repeated tasks would have huge benefits.

I will explain how to manually complete the command in hope that someone

can
give me some pointers on how I might automate the command:-

1) Open a dos command prompt
2) Navigate to the directory containing the file needed to be archived
3) Run the command from the directory

The problem I am facing is that the command cannot accept the file's
location as a paremeter and you have to select the directory.

Could the shell command be used to complete the above steps? i.e. can

you
issue multiple commands to the same command prompt window?

Any help would be really great.

Ta

Andi








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to save a desired window size but hv window comeup fullsz by d smjm1982 Excel Discussion (Misc queries) 1 February 15th 08 11:10 AM
View cell contents as a pop-up window (similar to comments window) Oldersox Excel Worksheet Functions 1 February 6th 08 07:09 AM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM
Excel Tends to access network when I issue commands ch Excel Discussion (Misc queries) 0 December 27th 05 08:33 AM
Compatibility Issue on VBA commands for Excel Steve C.[_3_] Excel Programming 1 September 6th 04 11:17 AM


All times are GMT +1. The time now is 01:06 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"