Hello! I am looking to make a simple script for OS X to move all files out of a folder and into a different folder.
For example: Say I download something, it finishes and it unpacks to a directory called "Ubuntu 11 04." Inside of this folder, is the actual burnable image file. I want to move that burnable image file to the Desktop and then delete the folder "Ubuntu 11 04." How do I go about doing this?
Any help is GREATLY appreciated!
Need help with simple script for OS X
Re: Need help with simple script for OS X
Someone else helped me out on a different forum. Here is what I am currently using if anyone was interested.
Code: Select all
#!/bin/bash
DIR_DEST=${HOME}/Movies/
DIR_TRASH=${HOME}/.Trash/
mv -f "$1"/* $DIR_DEST && mv -fv "$1" $DIR_TRASH
-
- Jr. Member
- Posts: 59
- Joined: March 2nd, 2009, 10:58 am
- Contact:
Re: Need help with simple script for OS X
Did you figure it out?
Crush wrote:Hello! I am looking to make a simple script for OS X to move all files out of a folder and into a different folder.
For example: Say I download something, it finishes and it unpacks to a directory called "Ubuntu 11 04." Inside of this folder, is the actual burnable image file. I want to move that burnable image file to the Desktop and then delete the folder "Ubuntu 11 04." How do I go about doing this?
Any help is GREATLY appreciated!
Re: Need help with simple script for OS X
Yep. My 2nd post contains the code I currently use.
Edit: I see my wording was ambiguous in my 2nd post. The code in that post is what I was ultimately looking for.
Edit: I see my wording was ambiguous in my 2nd post. The code in that post is what I was ultimately looking for.