12-20-2008
Quote:
Originally Posted by
mohantmk
Thanks it works. I can run my scripts using "C:\Program Files\PuTTY\psftp.exe" -b "C:\Documents and Settings\Mohan\My Documents\sftpcommands.txt".
I have another doubt it the same script, I need to rename file which iam getting from SFTP, i am not sure the file name which iam getting so iam using "*" but as example iam sending this "ren Test*.txt Test123.txt"
Can you tell me how to rename with date format something like test123[DDMMYYYY][time].
--
Thanks,
Mohan
Mohan, am i late..?
ren Test*.txt "Test%Date:/= % %Time::=.%.txt"
--ilan
9 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
I just bought a new pc and my unix software is installed on my old computer. I want to take the hard disk outta my old pc and then install it on my new pc so my new pc has 2 hard drives.
now, after my pc new has 2 hard drives, one being unix the other being windows xp, i want to be able to... (7 Replies)
Discussion started by: TRUEST
7 Replies
2. Shell Programming and Scripting
Hi everyone,
I have oracle 9i installed in Windows XP and i have ubuntu in VM WARE.
I would like to know how to connect to Oracle in windows xp from Linux through shel scripting...... (3 Replies)
Discussion started by: Zimbu
3 Replies
3. Shell Programming and Scripting
HI,
I have to transfer files from linux server to windows using secure ftp (sftp) .Kindly help me out. (3 Replies)
Discussion started by: manushi88
3 Replies
4. Linux
Hi,
i am trying to connect my Putty session on a windows box to a linux SSH, i have generated private and public key pairs using puttygen, i have set the public one to be in an OPENSSH format... and have put this in my authorized_keys file in linux, when i connect i get the following errors:
... (1 Reply)
Discussion started by: Jtyreman
1 Replies
5. Ubuntu
Hi,
Can anyone give me the steps to connect ubuntu from windows7?
Thanks (1 Reply)
Discussion started by: diehard
1 Replies
6. Shell Programming and Scripting
Hi
Need help to connect from Ubuntu to Windows using NetCat nc
I can not get my script to send new-line
Her is what I have tried(sleep 2 ; echo user ; sleep 1; echo pass; sleep 2; echo netstat) | nc -t 10.10.10.34 23
gives this outputÿý%ÿûÿûÿý'ÿýÿýÿûWelcome to Microsoft Telnet Service
... (1 Reply)
Discussion started by: Jotne
1 Replies
7. Windows & DOS: Issues & Discussions
Hi,
We are running Linux server and are required to connect to Windows server and fetch the files from windows server.
How can i connect to Windows server from Linux? I have to do this with a automated shell script on Linux
I appreciate your response. (4 Replies)
Discussion started by: reachmexyz
4 Replies
8. Shell Programming and Scripting
I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd"
i am trying in this manner "
ssh username@servername "cd... (5 Replies)
Discussion started by: sunil seelam
5 Replies
9. UNIX for Advanced & Expert Users
Greetings Experts,
I am working for a bank client and have a question on connect-direct and SFTP.
We are using Linux RedHat servers. We use connect-direct to transfer (NDM) files from one server to another server. At times, we manually transfer the files using SFTP from one server to another... (2 Replies)
Discussion started by: chill3chee
2 Replies
LEARN ABOUT REDHAT
unix2dos
unix2dos(1) General Commands Manual unix2dos(1)
NAME
unix2dos - UNIX to DOS text file format converter
SYNOPSYS
unix2dos [options] [-c convmode] [-o file ...] [-n infile outfile ...]
Options:
[-hkqV] [--help] [--keepdate] [--quiet] [--version]
DESCRIPTION
This manual page documents unix2dos, the program that converts text files in UNIX format to DOS format.
OPTIONS
The following options are available:
-h --help
Print online help.
-k --keepdate
Keep the date stamp of output file same as input file.
-q --quiet
Quiet mode. Suppress all warning and messages.
-V --version
Prints version information.
-c --convmode convmode
Sets conversion mode. Simulates unix2dos under SunOS.
-o --oldfile file ...
Old file mode. Convert the file and write output to it. The program default to run in this mode. Wildcard names may be used.
-n --newfile infile outfile ...
New file mode. Convert the infile and write output to outfile. File names must be given in pairs and wildcard names should NOT be
used or you WILL lost your files.
EXAMPLES
Get input from stdin and write output to stdout.
unix2dos
Convert and replace a.txt. Convert and replace b.txt.
unix2dos a.txt b.txt
unix2dos -o a.txt b.txt
Convert and replace a.txt in ASCII conversion mode. Convert and replace b.txt in ISO conversion mode.
unix2dos a.txt -c iso b.txt
unix2dos -c ascii a.txt -c iso b.txt
Convert and replace a.txt while keeping original date stamp.
unix2dos -k a.txt
unix2dos -k -o a.txt
Convert a.txt and write to e.txt.
unix2dos -n a.txt e.txt
Convert a.txt and write to e.txt, keep date stamp of e.txt same as a.txt.
unix2dos -k -n a.txt e.txt
Convert and replace a.txt. Convert b.txt and write to e.txt.
unix2dos a.txt -n b.txt e.txt
unix2dos -o a.txt -n b.txt e.txt
Convert c.txt and write to e.txt. Convert and replace a.txt. Convert and replace b.txt. Convert d.txt and write to f.txt.
unix2dos -n c.txt e.txt -o a.txt b.txt -n d.txt f.txt
DIAGNOSTICS
BUGS
The program does not work properly under MSDOS in stdio processing mode. If you know why is that so, please tell me.
AUTHOR
Benjamin Lin - ( blin@socs.uts.edu.au )
MISCELLANY
Tested environment:
Linux 1.2.0 with GNU C 2.5.8
SunOS 4.1.3 with GNU C 2.6.3
MS-DOS 6.20 with Borland C++ 4.02
Suggestions and bug reports are welcome.
SEE ALSO
dos2unix(1)
1995.03.31 unix2dos v2.2 unix2dos(1)