0

I want to copy all .xls files only from the INBOUND folder to the target folder and convert all .xls files to .csv files.

Below is the code I wrote but it is not working properly.

#!/bin/bash
SRC_PATH=/bishare/IRP_PROJECT/SXM_SFTP/*/INBOUND/*
TGT_PATH=/appinfprd/bi/infogix/IA83/InfogixClient/Scripts/IRP/New_Vendors/Xls_Convert/

cp $SRC_PATH {*.xls} $TGT_PATH

cd $TGT_PATH

for i in
do 
ssconvert i i.csv
done
pnuts
  • 58,317
  • 11
  • 87
  • 139
Midhun CM
  • 81
  • 1
  • 8

1 Answers1

0

To copy all xls files:

cp /path_to_INBOUND/*.xls /path_to_target/.

To do some action with those files:

cd /path_to_target/
for i in *; do ssconvert i i.csv; done

(Supposing that ssconvert command works in that way, I don't know it)

Zumo de Vidrio
  • 2,021
  • 2
  • 15
  • 33