I have a folder that has hundreds of text files that need to be uploaded. I can only upload 10 files at a time, so I like to organize my files into folders, so each folder only contains 10 files. The folders are numbered sequentially.
I know Keyboard Maestro has a foreach command, but I am not sure how to use it to move the files into folders. Thanks for any advice!
The word "upload" can mean many different things. For example, it could mean uploading with a shell command, or it could mean uploading with a web page interface, or it could mean copying the file to a network computer. It could mean so many different things, I wouldn't know how to write any KM code for you until you explain precisely what you mean by "uploading."
If you are limited to 10 at a time, I'm guessing it's a web server with some arbitrary limit of 10.
I am uploading to a website via Google Chrome. But I wasn't actually going to use Keyboard Maestro to upload the files (The files can only be uploaded via Drag and Drop, which I don’t think KM can support). I was just going to use KM to organize all the files into folders, so the files are put into batches of 10 per a folder. If they are batched in folders, it makes it easier to keep track of things when I am uploading, especially as there is a wait of 150 seconds after each upload.
Depending on the destinaton of your uploads, and when you want to make each upload, another solution design is just to get a list of all files to be uploaded, and then do the actual upload in groups of 10. This does NOT require moving any files.
So, for example, if you are uploading to a web site, you could:
Thanks! I actually use KM to go through the files in blocks of 10. But because I have to wait 150 seconds before the next upload, I often do other things, so sometimes when KM resumes, it selects the wrong 10 (because I might have clicked somewhere that spoiled it's flow). Using folders is a bit easier.
That should really not happen with a properly designed Macro.
I would just open a new tab for each upload cycle, having closed the prior tab.
So it should be able to run unattended without any interference.
If you want to upload your macro I'll take a look at it to see if that issue can be avoided.