aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInigoGutierrez <inigogf.95@gmail.com>2019-07-17 16:58:12 +0200
committerInigoGutierrez <inigogf.95@gmail.com>2019-07-17 16:58:12 +0200
commit25730d4bffa8c956090987344c8cd70ebdf47ac8 (patch)
tree2b9125eb96e6075927bd5f40d31ec8065dc757e0
parent769812ad7cb98077cbf8d0893ebdc9b72a62dcc8 (diff)
downloadscripts-25730d4bffa8c956090987344c8cd70ebdf47ac8.tar.gz
scripts-25730d4bffa8c956090987344c8cd70ebdf47ac8.zip
Created scripts to copy and move files using .paths file
-rwxr-xr-xcopy.sh7
-rwxr-xr-xmove.sh7
2 files changed, 14 insertions, 0 deletions
diff --git a/copy.sh b/copy.sh
new file mode 100755
index 0000000..402d84e
--- /dev/null
+++ b/copy.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Receives a filename as argument and copies it to a folder selecting it with fzf
+
+filename="$1"
+target="$(selectPathFzf.sh "Copy to: ")"
+cp "$filename" "$target"
diff --git a/move.sh b/move.sh
new file mode 100755
index 0000000..42b3384
--- /dev/null
+++ b/move.sh
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# Receives a filename as argument and moves it to a folder selecting it with fzf
+
+filename="$1"
+target="$(selectPathFzf.sh "Move to: ")"
+mv "$filename" "$target"