»
 

Go Back   ResellerRatings Store Ratings > ResellerRatings Forums > Tech Support

Reply
 
LinkBack Thread Tools Display Modes
Old 07-07-2003, 01:17 PM   #1 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 2
gideon27 is on a distinguished road
Batch files for DOS

I'm not much of a DOS expert and need a hand. I am running a dos command called pscp that connects to a remote server to transfer files. This command requires a password to be entered after the command and its parameters has been entered. I am trying to write a DOS batch file that will automate this because I have to run it several times. What do I need to do in the batch to get the password to be sent to the prompt and entered when the prompt requests it. I want it to be done without having to hit anymore keys after the batch is running.

gideon27 is offline   Reply With Quote
Old 07-07-2003, 01:44 PM   #2 (permalink)
Registered User
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: Bay Area, CA USA
Posts: 6,966
OuTpaTienT is on a distinguished road
Send a message via ICQ to OuTpaTienT
Have ya tried this first? (from PuTTY User Manual. Note red highlighted command-line option.)

5.2 PSCP Usage

Once you've got a console window to type into, you can just type pscp on its own to bring up a usage message. This tells you the version of PSCP you're using, and gives you a brief summary of how to use PSCP:

Z:\owendadmin>pscp
PuTTY Secure Copy client
Release 0.53
Usage: pscp [options] [user@]host:source target
pscp [options] source [source...] [user@]host:target
pscp [options] -ls user@host:filespec
Options:
-p preserve file attributes
-q quiet, don't show statistics
-r copy directories recursively
-v show verbose messages
-load sessname Load settings from saved session
-P port connect to specified port
-l user connect with specified username

-pw passw login with specified password
-1 -2 force use of particular SSH protocol version
-C enable compression
-i key private key file for authentication
-batch disable all interactive prompts
-unsafe allow server-side wildcards (DANGEROUS)
OuTpaTienT is offline   Reply With Quote
Old 07-07-2003, 01:48 PM   #3 (permalink)
Registered User
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 1,096
meese is on a distinguished road
Welcome to the forum.

Read through this link. I believe you will find the answer there.

http://www.tartarus.org/~simon/puttydoc/Chapter5.html
meese is offline   Reply With Quote
Old 07-07-2003, 06:43 PM   #4 (permalink)
Registered User
 
Join Date: Jul 2003
Posts: 2
gideon27 is on a distinguished road
Thanks both of you. I didn't even know that the -pw was an option on that command. Problem solved.
gideon27 is offline   Reply With Quote
Reply




Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Most Active Discussions

Recent Discussions

All times are GMT -6. The time now is 03:23 AM.