![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Programming A discussion forum for programs and programming used in tech-related businesses. |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: May 2009
Posts: 18
OS: Windows 2005
|
Hi all,
I am using the following code to FTP the xml files to the UNIX folder @echo off SetLocal :: Set local folder you want to upload here. Set _lcd=C:\Folder to upload :: Will use current folder as a Temp folder for the FTP Script Set _tmpfld=%~dp0 Set _tmpfld=%_tmpfld:~0,-1% :: Set the Folder on the FTP server that you want to upload to Set _FTPRoot=/bcmf/intin/ >"%_tmpfld%\ftpcmds.}t{" Echo open ftp.server.com >>"%_tmpfld%\ftpcmds.}t{" Echo Username >>"%_tmpfld%\ftpcmds.}t{" Echo password >>"%_tmpfld%\ftpcmds.}t{" Echo cd "%_FTPRoot%" >>"%_tmpfld%\ftpcmds.}t{" Echo lcd "%_lcd%" >>"%_tmpfld%\ftpcmds.}t{" Echo binary >>"%_tmpfld%\ftpcmds.}t{" Echo mput *.* >>"%_tmpfld%\ftpcmds.}t{" Echo chmod 777 *.xml >>"%_tmpfld%\ftpcmds.}t{" Echo quit ftp -v -i -s:"%_tmpfld%\ftpcmds.}t{" :: Delete the script Del "%_tmpfld%\ftpcmds.}t{" EndLocal In the highlighted line i actually need to give 777 permission for all the files in the UNIX box once it is transferred. But i get an error in this line which states "INVALID COMMAND" I also tried with find "." -exec chmod 777 but its throwing out the same error. Kindly help me to set the permissions. regards, coddy. |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
TSF Enthusiast
Join Date: Mar 2009
Location: Portland, OR
Posts: 756
OS: MS-Dos 6.22 - Win7
|
Re: Help in batch script -chmod 777 command
Don't know a lot about the FTP Server side of things, but did some googling and got some ideas.
You could try SITE CHMOD 777 filename.xml Might have to use lowercase: site chmod Are you sure it's a Unix system you are uploading to? Does SYST Return as Unix, or also give invalid command? Could be the CHMOD command has been disabled for some reason. You'd have to contact the FTP site Admin and make sure they support using CHMOD. Jerry
__________________
Microsoft MVP - Windows Desktop Experience Of course I know all the answers; I just don't always match the answers to the right questions. Rated R for Violence -- When your PC flies through a window, that's violent, right? |
|
|
|
|
|
#3 (permalink) |
|
Registered User
Join Date: May 2009
Posts: 18
OS: Windows 2005
|
Re: Help in batch script -chmod 777 command
yes you are right... Its surely a UNIX system i am uploading to and i get an error as invalid command :(
But the chmod is working fine when i try try running the script thru Telnet.. so we cud confirm that CHMOD is not been disabled. |
|
|
|
![]() |
| Thread Tools | |
|
|