loop through downloaded folder

Ask for help and report issues not specific to either the Mac OS X or GTK+ versions of Transmission
Post Reply
Ortix
Posts: 28
Joined: Wed Nov 18, 2009 2:03 am

loop through downloaded folder

Post by Ortix »

I have an infrastructure set up on my server which triggers an upload with plowshare once a download is complete. Currently this only works if there are no folders involved.

I was hoping someone could help me figure out how i would go about doing this in bash when there is a folder which contains files.

Let's say I have Folder A containig File1.ext and File2.ext

I would first have to run a check if the downloaded file is a folder. Then if it is, i have to drill down and for each file I have to run a line of code.

Anyone kind of enough to help me out here?
gunzip
Posts: 272
Joined: Wed May 05, 2010 2:12 am

Re: loop through downloaded folder

Post by gunzip »

you could just use a readily available archiving tool (zip, tar, rar) and create single file from the folder, and upload as you do now.
Ortix
Posts: 28
Joined: Wed Nov 18, 2009 2:03 am

Re: loop through downloaded folder

Post by Ortix »

I don't want that. I need every file uploaded separately.
Post Reply