I am trying to copy files from one directory to another using shell script. Can anyone please troubleshoot the code.
thanks in advance...
#!C:\Shell\sh.exe
files_dir="C:\Documents and Settings\scripts\files"
backup_dir="C:\Documents and Settings\scripts\ztest"
echo cding to files directory
cd $files_dir
echo copying all files to backup directory
copy $files_dir $backup_dir
Output:
C:\Documents and Settings\scripts>sh backup.sh
cding to files directory
cd: can't cd to C:\Documents
copying all files to backup directory
copy: not found