PDA

View Full Version : Saving a range of folders to difference folders ?



Gavin
07-20-2011, 02:19 AM
Hi,

When saving a range of folders (take the example below), with each folder having the same range of file-names, download studio can sort them into folders named with the date and time (which is not what i want) since it can download 2 folders in the same minute, the files are getting mixed up and i get both 01.png's in the same folder with one renamed 01 (01) or whatever it's up to.

http://fc08.textures.net/01/01.png
http://fc08.textures.net/01/02.png
...
http://fc08.textures.net/02/01.png
http://fc08.textures.net/02/02.png

What I want is for all files from the 01/ url branch to be saved in an 01 folder and all files in the 02 url branch to be saved in an 02 folder. So basically i want to have downloads saved into folders that are named according to the url or the current range value. Is this possible ?

If not, although I'm not familiar yet with the 'add job from file' feature. I was hoping maybe i could write a program to generate a 'job list' that would tell it where to save each file. eg.

http:somesite.net/01/01.png c:/01/
http:somesite.net/01/02.png c:/01/
http:somesite.net/02/01.png c:/02/

But I'm not sure how the job list works. Any help in getting more complex and useful folder naming would be appreciated.

Thank you.

PS, have recently started using DownloadStudio, I'm pretty impressed with it's power and usefulness.

Peter
07-20-2011, 09:06 AM
You can add jobs to DownloadStudio from the command line using the following xml syntax:

<downloadstudio><script><add_jobs download_immediately=yes display_dialog=no><joblist><job><type>file_range</type><url>http://fc08.textures.net/01/01.png</url><referer/><user_agent>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET CLR 1.1.4322; FDM)</user_agent><folder>C:\01\</folder><file>http://fc08.textures.net/01/[01-05].png</file></job></joblist></add_jobs></script></downloadstudio>

If you modify the url within the <url> tags and the folder within the <folder> tags you will be able to add jobs for the folder customization you want.



<downloadstudio><script><add_jobs download_immediately=yes display_dialog=no><joblist><job><type>file_range</type><url>http://fc08.textures.net/02/01.png</url><referer/><user_agent>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET CLR 1.1.4322; FDM)</user_agent><folder>C:\02\</folder><file>http://fc08.textures.net/02/[01-05].png</file></job></joblist></add_jobs></script></downloadstudio>

So in your program you would call: DownloadStudio.exe "<downloadstudio><script><add_jobs download_immediately=yes display_dialog=no><joblist><job><type>file_range</type><url>http://fc08.textures.net/02/01.png</url><referer/><user_agent>Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET CLR 1.1.4322; FDM)</user_agent><folder>C:\02\</folder><file>http://fc08.textures.net/02/[01-05].png</file></job></joblist></add_jobs></script></downloadstudio>"

Gavin
07-20-2011, 06:51 PM
Thanks for the reply. I'll try it out.

Gavin
07-21-2011, 10:49 AM
yep, that's what i needed, worked perfectly. Thank you.