2012-08-20, 23:24
Hi! Yesterday i had this folder, with HTML files and i wanted each html file in a separate folder, with the same name as the file. So i searched around and i found this command on one of the topics:
FOR %i IN (.) DO (IF NOT EXIST "%~ni" MD "%~ni") & (MOVE "%i" "%~ni")
So the files were like this:
C:\files\lol4.html
C:\files\lol3.html
C:\files\lol5.html
and after the command they became like this:
C:\files\lol4\lol4.html
C:\files\lol3\lol3.html
C:\files\lol5\lol5.html
Perfect! that's what i wanted! Now in each of those HTML files have a download link to a rar file in it, I want to download them and save them in the same folder.
So if what i said above is possible, after the downloads the folders in C:\files will contain this:
C:\files\lol4\lol4.html C:\files\lol4\lol4.rar
C:\files\lol3\lol3.html C:\files\lol3\lol3.rar
C:\files\lol5\lol5.html C:\files\lol5\lol5.rar
The HTML files also contain a JPG link. I want it to be saved in the same folder, just as the rar files. There are more then 700 folders and html files, so if someone could kindly tell me how to do that it would be much appreciated. I also wish to know where can i learn such type of language?
Thanks in advance for the attention.
FOR %i IN (.) DO (IF NOT EXIST "%~ni" MD "%~ni") & (MOVE "%i" "%~ni")
So the files were like this:
C:\files\lol4.html
C:\files\lol3.html
C:\files\lol5.html
and after the command they became like this:
C:\files\lol4\lol4.html
C:\files\lol3\lol3.html
C:\files\lol5\lol5.html
Perfect! that's what i wanted! Now in each of those HTML files have a download link to a rar file in it, I want to download them and save them in the same folder.
So if what i said above is possible, after the downloads the folders in C:\files will contain this:
C:\files\lol4\lol4.html C:\files\lol4\lol4.rar
C:\files\lol3\lol3.html C:\files\lol3\lol3.rar
C:\files\lol5\lol5.html C:\files\lol5\lol5.rar
The HTML files also contain a JPG link. I want it to be saved in the same folder, just as the rar files. There are more then 700 folders and html files, so if someone could kindly tell me how to do that it would be much appreciated. I also wish to know where can i learn such type of language?
Thanks in advance for the attention.