Upload mattia_rag_data/copy_files.sh with huggingface_hub
Browse files
mattia_rag_data/copy_files.sh
ADDED
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env bash
|
2 |
+
|
3 |
+
# Path to the list of files
|
4 |
+
FILELIST="filelist.txt"
|
5 |
+
|
6 |
+
# Destination directory
|
7 |
+
DESTINATION="."
|
8 |
+
|
9 |
+
# Copy each file listed in FILELIST to DESTINATION
|
10 |
+
# The 'while read -r' loop ensures we handle spaces in filenames properly
|
11 |
+
while read -r FILEPATH; do
|
12 |
+
# If the line in the filelist isn't empty, copy the file
|
13 |
+
if [ -n "$FILEPATH" ]; then
|
14 |
+
echo "Copying: $FILEPATH -> $DESTINATION"
|
15 |
+
cp "$FILEPATH" "$DESTINATION"
|
16 |
+
fi
|
17 |
+
done < "$FILELIST"
|
18 |
+
|