Hi,
I have been using the following to move a file from Unix to Windows
-- before
#! /bin/ksh
# Move to appropriate directory
cd /user/transfers/out/in_cab
mv unprocessed/*.* .
mv journey_tester.xml journey_tester.txt
# FTP all files in directory
ftp -inv server_name <<EOF
user username password
ascii
cd ESIFileIn
del journey_tester.xml
mput journey_tester.txt
rename journey_tester.txt journey_tester.xml
bye
EOF
mv *.* processed/
Now that it's working with a static filename, I have to get it working with a dynamically created filename. The following doesn't work
-- after
#! /bin/ksh
# Move to appropriate directory
cd /user/transfers/out/in_cab
mv unprocessed/*.* .
mv *.xml *.txt
# FTP all files in directory
ftp -inv server_name <<EOF
user username password
ascii
cd ESIFileIn
del *.xml
mput *.txt
rename *.txt *.xml
bye
EOF
mv *.* processed/
The filename will be similar to this....
JourneyScheduleImport1009207604061601_20040616022915.xml
but will change constantly.
How can I cope with this situation please ?
tia,