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.
|