Script request Move content of downloaded folder one folder up

Come up with a useful post-processing script? Share it here!
Post Reply
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Script request Move content of downloaded folder one folder up

Post by roads »

Hi, I am not able to write a script for the Mac and it does not look good for the feature request to unpack all files without folder generation or move all files one up and delete the downloadfolder. It would be great if someone could please throw those lines together. Thank you in advance.
User avatar
inpheaux
Administrator
Administrator
Posts: 563
Joined: January 16th, 2008, 9:14 pm

Re: Script request Move content of downloaded folder one folder up

Post by inpheaux »

Here's a windows script, I believe there's a Linux/Mac bash script to do the same thing around here somewhere, I just couldn't find it.
roads
Full Member
Full Member
Posts: 106
Joined: February 16th, 2010, 3:06 pm

Re: Script request Move content of downloaded folder one folder up

Post by roads »

Did not find it either. I did a search before posting I did! :) I went through all threadnames but nothing matches the req.
Last edited by roads on February 22nd, 2010, 11:39 am, edited 1 time in total.
doubledrat
Release Testers
Release Testers
Posts: 180
Joined: February 20th, 2008, 3:16 pm

Re: Script request Move content of downloaded folder one folder up

Post by doubledrat »

probably something like

Code: Select all

mv $1/* ..
rm $1
I would leave the rm line out until you're sure the mv works

not sure if rm on a mac will remove the folder as long as it's empty.  if not, you might need to use rmdir
Last edited by doubledrat on February 22nd, 2010, 12:27 pm, edited 1 time in total.
Post Reply