Copy + Delete
Posted: November 18th, 2010, 2:40 pm
I'm trying to work around what appears to be a limitation of my Synology diskstation, but I'm not having much luck at the moment.
I posted my original problem here.
Instead of trying to create a script to adjust the permissions, it's probably easier to download the files to a different location and then copy them into their destination folder. That way they'll inherit all the permissions I want them to.
I've had a bit of a browse around here and various other places, but I'm still not sure how to get the script to run (it keeps failing at the moment).
I've tried doing a move command as a test to see if I've got the commands right, but I'm obviously doing something wrong 'cos it isn't working. I'm sure I read something in the past about the file extension, but I've seen references to both .py and .sh while hunting for an answer. What I've got so far:
filename=copy.py
Which just results in "Cannot run script /volume1/SABnzbd/Scripts/copy.py"
Now I'm aware that (with Windows at least) a move command will retain its file permissions, which obviously won't help in the long run as I'll still be stuck with the wrong permissions, and I understand that I can just replace mv with cp to get the files in the right location, but I'm not sure how to delete the source files after I've copied them to their destination.
Anyway, I'm hoping someone can point me in the right direction.
Cheers
I posted my original problem here.
Instead of trying to create a script to adjust the permissions, it's probably easier to download the files to a different location and then copy them into their destination folder. That way they'll inherit all the permissions I want them to.
I've had a bit of a browse around here and various other places, but I'm still not sure how to get the script to run (it keeps failing at the moment).
I've tried doing a move command as a test to see if I've got the commands right, but I'm obviously doing something wrong 'cos it isn't working. I'm sure I read something in the past about the file extension, but I've seen references to both .py and .sh while hunting for an answer. What I've got so far:
filename=copy.py
Code: Select all
#!/bin/bash
mv $1 /volume1/Recordings/Shared
Now I'm aware that (with Windows at least) a move command will retain its file permissions, which obviously won't help in the long run as I'll still be stuck with the wrong permissions, and I understand that I can just replace mv with cp to get the files in the right location, but I'm not sure how to delete the source files after I've copied them to their destination.
Anyway, I'm hoping someone can point me in the right direction.
Cheers