06-03-2013
[Solved] Is it possible to use PuTTY psftp.exe to move file from one directory to another?
Hello All,
I am running a script (power shell) from my desktop (Windows). The script needs to sftp a file(using PuTTY psftp.exe ) from my desktop to a server(UNIX server). Then, as a second step, the script needs to move (or copy and delete) this file from one directory on the server (UNIX server) to another directory on the same server (UNIX server).
I have no issues executing the first step. However, I cannot figure out how to execute the second step(move the file) using PuTTY psftp.exe .
Thanks in advanced,
AK,
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Move a file from windows directory to unix directory, is this possible?
if it is, can someone help me on this?
Thanks! God bless! (1 Reply)
Discussion started by: kingpeejay
1 Replies
2. Shell Programming and Scripting
I Need help for one requirement,
I want to move the latest/Older file in the folder to another file. File have the datetimestamp in postfix.
Example:
Source Directory : \a
destination Directory : \a\b
File1 : xy_MMDDYYYYHHMM.txt (xy_032120101456.txt)
File2: xy_MMDDYYYYHHMM.txt... (1 Reply)
Discussion started by: pp_ayyanar
1 Replies
3. Windows & DOS: Issues & Discussions
Hello,
I'm looking for a way to use PSFTP or PSCP, executed from a batch file in Windows, to delete an entire folder and its contents. I can run a script using PSFTP which can use rm or rmdir, but the -rf command doesn't work. Any suggestions on another client to use in the same context, or a... (2 Replies)
Discussion started by: ocdcollector
2 Replies
4. Windows & DOS: Issues & Discussions
I've created a .bat file with this line:
start C:\USERS\Putty\putty.exe -ssh user@server.com -pw password
That opens a putty session and logged in it with the user and password i've already specified. But now, I want to enter a simple command like "ls -l" for example.. How can I do that?
I've... (3 Replies)
Discussion started by: nirmal.mukundan
3 Replies
5. Solaris
Hi,
I use to work on solaris via putty
and always on session start
- i use to increase the font to 14 bold
- capture session output to a file
my requirement) to make these changes permanent, so that i need not to change the settings everytime i connect via putty
please advice.
... (0 Replies)
Discussion started by: saurabh84g
0 Replies
6. UNIX for Dummies Questions & Answers
my script is:
/u/user/orginal/:#! /bin/ksh
find . -name "aur_prog*" -exec grep -il "error" > test.out
#awk command to destination directory
exit
test.out file contain:
./aur_prog1.log
./aur_prog2.log
... (5 Replies)
Discussion started by: roughwal
5 Replies
7. UNIX for Dummies Questions & Answers
I written unix script where a pdf file generates. But if the script is used by multiple people at a time it generates same pdf with two different owner names and creating a problem with permission while moving the file. is there a way where i can move the file filtering with the user? (4 Replies)
Discussion started by: lakers646
4 Replies
8. Solaris
Hi,
I want to run putty.exe in Solaris server.My main aim is to invoke the putty.exe in Solaris server from a web application(.jsp) deployed in the server so that putty terminal should open.
Thanks in advance (11 Replies)
Discussion started by: chaithanyaa
11 Replies
9. Shell Programming and Scripting
I have a script, which is checking if file exists and move it to another directory
if
then
mkdir -p ${LOCL_FILES_DIR}/cool_${Today}/monthly
mv report_manual_alloc_rpt_A_I_ASSIGNMENT.${Today}*.csv ${LOCL_FILES_DIR}/cool_${Today}/monthly
... (9 Replies)
Discussion started by: digioleg54
9 Replies
10. Windows & DOS: Issues & Discussions
I ssh from Windows to Linux server and execute a few commands. I have ssh keys setup between them and works fine.
The commands get executed on the Linux server however I wish to stay on the Linux terminal that was opened by putty.exe. However, the terminal simply does the job and closes.
... (10 Replies)
Discussion started by: mohtashims
10 Replies
LEARN ABOUT DEBIAN
path2listing
PATH2LISTING(1) General Commands Manual PATH2LISTING(1)
NAME
path2listing - script facilitating the conversion to managing gconf configuration sources with desktop-profiles
SYNOPSIS
path2listing [options]
DESCRIPTION
This script takes a single gconf path file (the systemwide one, i.e. /etc/gconf/2/path, when not told otherwise) and reads through it in
order to create an ordered list of known configuration sources (it will recurse into included path files when necessary). Using that
ordered list it will then create a desktop-profiles_path2listing.listing file containing metadata for all known configuration sources,
assigning a precedence value to each encountered configuration source so that:
a) the order of sources is the same
b) there is space between the precedence values of the various sources to allow for inclusion of additional profiles in the future.
c) all mandatory sources have a positive precedence value, and all non-mandatory sources have a negative precedence value
In addition to generating the desktop-profiles_path2listing.listing file, this script will also replace the converted path file by one that
assumes that desktop-profiles manages all configuration sources (NOTE: a backup copy of all changed files is made, so you can always go
back to the previous situation).
OPTIONS
-d,--distance
distance between the precedence values of each successive pair of configuration sources (defaults to 50), the idea being that you
leave some space to insert future sources.
-f, --file
path file to convert (defaults to /etc/gconf/2/path)
-h, --help
display the help message
-o, --output-file
file to put the generated metadata in (defaults to /etc/desktop-profiles/desktop-profiles_path2listing.listing). If this file exists
a backup copy will be made prior to overwriting it.
--no-replace-file
don't replace the path file we're converted with one assuming desktop-profiles manages activation
FILES
/etc/gconf/2/path - systemwide gconf path file, default path file to convert
/etc/desktop-profiles/desktop-profiles_path2listing.listing - default name for the file containing the generated metadata
AUTHOR
This manual page was written by Bart Cornelis <cobaco@skolelinux.no>.
SEE ALSO
desktop-profiles(7)
desktop-profiles May 07, 2005 PATH2LISTING(1)