- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cannot FTP from Unix to Windows
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2011 03:23 AM
07-16-2011 03:23 AM
Re: Cannot FTP from Unix to Windows
>please check and feedback whether it is in correct format
I made a mistake on the here doc format and yes, that's the IP or the DNS name of the windows system.
ftp -n -i machine(here i have to mention the win ipaddress?) <<EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2011 04:41 AM
07-16-2011 04:41 AM
Re: Cannot FTP from Unix to Windows
Dear Handy,
Thanks for your reply. Please check the below script,
Script:
ftp -n -i 10.10.xxx.xxx <<EOF
user domain"\"syed test123
cd D:"\"backup ----windows directory
lcd "/"dumps -----unix directory
put file.txt
bye
EOF
--- on running the above script i faced the error as
$ sh test.sh
D:: The filename, directory name, or volume label syntax is incorrect.
Local directory now /dumps
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2011 12:12 PM - edited 07-27-2011 12:55 PM
07-16-2011 12:12 PM - edited 07-27-2011 12:55 PM
Re: Cannot FTP from Unix to Windows
Your problem is those evil backslashes.
If you aren't using any "$" variables in your here document, you should quote the here doc "word":
ftp -n -i 10.10.xxx.xxx <<\EOF
user domain\syed test123 What you had worked, hopefully this will too.
cd D:\backup ----windows directory If this doesn't work, add add another "\" until it does.
lcd /dumps -----unix directory No need to quote this, Unix loves slashes. ;-)
put file.txt
bye
EOF
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2011 01:07 AM
07-17-2011 01:07 AM
Re: Cannot FTP from Unix to Windows
Dear Handy,
As per your given steps i run the below script
#!/bin/sh
. .oraenv
ftp -n -i 10.10.xxx.xxx <<\EOF
user domain\syed test123
cd D:\ --- trying to transfer the file directly into D directory
lcd /dumps
put t.dmp
bye
EOF
It gives me below errors.
$ sh tftp.sh
User domainsyed cannot log in.
Login failed.
Please login with USER and PASS.
Local directory now /dumps
Please login with USER and PASS.
*************************************
But when i try to update the script by appending quotations to \
#!/bin/sh
. .oraenv
ftp -n -i 10.10.xxx.xxx <<EOF
user domain"\"syed test123
cd D:"\"
lcd /dumps
put t.dmp
bye
EOF
then i am facing this below error
$ sh tftp.sh
D:\: The filename, directory name, or volume label syntax is incorrect.
Local directory now /dumps
Please advice and let me know where exactly am going wrong.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2011 02:13 PM
07-17-2011 02:13 PM
Re: Cannot FTP from Unix to Windows
>user domain"\"syed test123
You might want to change this to: "domain\syed"
so it looks better.
>cd D:"\"
Again, change to: cd "D:\"
And if that fails:
cd D:\
cd D:\\
cd D:\\\
>then I am facing this below error
>D:\: The filename, directory name, or volume label syntax is incorrect.
Not sure why, when your quote trick worked for your name?
>Please advice and let me know where exactly am going wrong.
There is no exactly, you just have to experiment until you get it right.
I suppose you could use tusc to see if the shell here-doc is processed correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2011 06:20 AM
07-18-2011 06:20 AM
Re: Cannot FTP from Unix to Windows
Dear Handy,
Even though i append this below commands in quotes i am facing the same old error.
D:\: The filename, directory name, or volume lable syntax is incorrect.
I tried all the steps i,e by ging "D:/" , "D://", "D:///" , D:"/",....etc... but still facing the same error.
Please advise.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2011 09:46 AM
07-18-2011 09:46 AM
Re: Cannot FTP from Unix to Windows
>I tried all the steps I,e by giving "D:/" , "D://", "D:///" , D:"/",.... etc. but still facing the same error.
I assume you tried backslashes and not "/"?
You may want to use ftp interactively so you can keep trying various combinations.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-18-2011 11:04 PM
07-18-2011 11:04 PM
Re: Cannot FTP from Unix to Windows
Dear Handy,
>> assume you tried backslashes and not "/"?
Yes ofcourse i do use backslashes and not "/".
>>You may want to use ftp interactively so you can keep trying various combinations.
Since from last week i was trying until now, but unable to reach to the good result.
Please experts do the needful.
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2011 04:10 AM - edited 07-19-2011 04:14 AM
07-19-2011 04:10 AM - edited 07-19-2011 04:14 AM
Re: Cannot FTP from Unix to Windows
I created a HP-UX directory: Back\slash
Then I used ftp interactively:
$ ftp foo
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> cd /home/bar
250 CWD command successful.
ftp> cd Back\slash
550 Backslash: No such file or directory.
ftp> cd Back\\slash
250 CWD command successful.
ftp> pwd
257 "/home/bar/Back\slash" is current directory.
Using a here-doc, this worked:
ftp -n foo <<\EOF
user bar password
cd /home/bar/Back\\slash
pwd
bye
EOF
257 "/home/bar/Back\slash" is current directory.
Changing above cd also worked:
cd "/home2/dhandly/Back\slash"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-19-2011 05:56 AM
07-19-2011 05:56 AM
Re: Cannot FTP from Unix to Windows
Now i face some critical issue in my loal pc, i have lost many files from my local pc drive after running this below script.
After setting the path to D:\ in FTP SIte Directory location, i ran the below script.
$ vi tftp.sh
"tftp.sh" 9 lines, 122 characters
#!/bin/sh
. .oraenv
ftp -n -i 10.10.xxx.xxx<<EOF
user domai"\"syed test123 ---------------- Here i have connect to windows D:\ drive
lcd /dumpfiles
mput * ------------ Here files should be transfered from unix to windows D:\ drive
mdelete * ----------- FIles to be deleted after it get transfered
bye
EOF
~
~
"tftp.sh" 13 lines, 134 characters
$ sh tftp.sh
Local directory now/dumpfiles
archive.pst: The process cannot access the file because it is being used by another process.
main_windowl.fmb: Access is denied.
Please have it/MCMS.exe: The process cannot access the file because it is being used by another process.
SharedWork/request_tab_A.rdf: Access is denied.
SharedWork/request_tab_E.rdf: Access is denied.
But the script deleted all files from the window drive D:\ , I LOST ALL MY FILES WHICH WAS IN D:\ drive.
PLEASE DO THE NEEDFUL, I REALLY NEED THE HELP, I LOST MANY DATA
PLEASE EXPERTS HELP ME TO GWT RID OUT FROM THIS LOOS.
HOW I CAN ROOLBACK THOSE FILES WHICH WAS DELETED WITH "mdelete *" command...
Regards