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?
loop through downloaded folder
Re: loop through downloaded folder
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.
Re: loop through downloaded folder
I don't want that. I need every file uploaded separately.