home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Applications and Operating Systems
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Topic: 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...
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1657
Discussions: 186,221, Posts: 2,222,708, Members: 229,780
Old July 7th, 2003, 04:17 PM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jul 2003
Posts: 2
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
TechIMO.com Ads - Login or register for less ads.


Guest, Register Free! to remove this ad and get your tech support questions answered in minutes!
Old July 7th, 2003, 04:44 PM     #2 (permalink)
ᅟᅠ
 
OuTpaTienT's Avatar
 
Join Date: Oct 2001
Location: ɐqɟs
Posts: 10,443
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 July 7th, 2003, 04:48 PM     #3 (permalink)
Ultimate Member
 
meese's Avatar
 
Join Date: Jun 2003
Location: NJ
Posts: 2,467
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 July 7th, 2003, 09:43 PM     #4 (permalink)
Junior Member
 
Join Date: Jul 2003
Posts: 2
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

Posting Rules
You may post new threads
You may 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
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is It Just Me? (16960)
So GLAD winter's finally here !! (15)
FolderChat: Weekend time again! (284)
The F word (under-utilized or horri.. (23)
Folderchat Weekday thread (373)
Super folding (17)
Popular Online Pc Retailers (12)
AM2+/AM3 (9)
PSU recommendation, think mines is .. (14)
Recent Discussions
Sapphire Radeon HD 3850 512Mb A.. (1)
Need help with ASUS M2400N Inte.. (0)
Desktop Clutter (1)
Graphics Card Icon In Sys Tray .. (3)
Addon DSL wireless router (4)
My Internet Connection Times Ou.. (4)
New Graphics Problem!! Please r.. (15)
New info on the Phenom II X4 (3)
Test your mouse skillz! (4)
Seald copy of windows 95 for sa.. (0)
Various items for sale (1)
Woot-off (5)


All times are GMT -4. The time now is 09:39 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28