I really need help... I am NEW to this scripting, using terminal and whatnot, so please be patient .
I have a list of filenames (currently with no file extension) in an Excel file and I need to copy those specific files from one folder to another.
I tried using this script in Terminal:
#!/bin/bash
target="Marcom_NAS/maco/BILLEDER/pic"
destination="Dina/Users/dfanoe/Desktop/Found"
fnames=$(cat /Users/dfanoe/Desktop/STEPpics/Final.xlsx)
for i in $fnames; do
cp ${target}/${i} ${destination}/
echo "copying $i"
done
echo "done"
I found it here on the forum but I cant get it to work.
Should the file names in the Excel file all have extension, ie .jpg?
The target folders name is "pic" and the destination folders name is "Found" but when I copy it into Terminal it says that the folder Found couldnt be found? The excel file name is "Final.xlsx"
Is there any way you guys can help me? Again - please be very specific since this is practically foreign language to me...
I have a list of filenames (currently with no file extension) in an Excel file and I need to copy those specific files from one folder to another.
I tried using this script in Terminal:
#!/bin/bash
target="Marcom_NAS/maco/BILLEDER/pic"
destination="Dina/Users/dfanoe/Desktop/Found"
fnames=$(cat /Users/dfanoe/Desktop/STEPpics/Final.xlsx)
for i in $fnames; do
cp ${target}/${i} ${destination}/
echo "copying $i"
done
echo "done"
I found it here on the forum but I cant get it to work.
Should the file names in the Excel file all have extension, ie .jpg?
The target folders name is "pic" and the destination folders name is "Found" but when I copy it into Terminal it says that the folder Found couldnt be found? The excel file name is "Final.xlsx"
Is there any way you guys can help me? Again - please be very specific since this is practically foreign language to me...