main file configuration

I was writing a script that will FTP files to destination folder. All configuration should be done through a properties files and the main script will read the values from the properties file.

the properties file should contain
1) Source folders
2) Source file pattern
3) Destination folder
4) User id
5)remote server url

I have created the structure of the properties file also and the name of the property file would be archieve1.config

#remoteurl of the machine 
Remoteurl=sfy.waly.com

# your user id 
userid=youruserid


#This is the source directoy from where the files will be picked up
SrcFolders=/home/Administrator/files


#This directory path should end with a slash(/)
DestFolder=/home/Administrator/output/


#the pattern of the files
SourcefilePattern=*.txt

and now the command for sftp which I was using earlier without use of property file was..

sftp username@host <<EOF
lcd /home/dirA
cd /home/dirB
mput *.txt
exit

Thi above script works perfect and ftp the files from one folder to another within the same server but now I want to make a seprate main script file that will read the properites files as shown above that is from archieve1.config and nothing will be hard coded like username would be read from properties file etc and will sftp files from one folder to another within that server , so how would be the main script file ..please guide me..!!

main.sh

#!/bin/ksh

. /path/to/archieve1.config

echo "Remoteurl->[${Remoteurl}]
....

Hi,

so the main script file would include the properties file lyk this way...shown below..

#!/bin/ksh
. /path/to/archieve1.config
sftp $userid@$Remoteurl <<EOF
lcd /home/dirA cd /home/dirB mput *.txt exit

Is this the correct way in the main script file...if something wrong then please guide me...!!

This is bumping/double posting...
Thread closed, continue here:

something like that - just replace any hardwired references with the variable you define in your config file AND try it.