View Single Post
Old 05-19-2009, 05:53 AM   #1 (permalink)
Codesearcher
Registered User
 
Join Date: May 2009
Posts: 18
OS: Windows 2005


Pencil Help in batch script -chmod 777 command

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.
Codesearcher is offline   Reply With Quote
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