Jump to content

Move unlisted torrents to... VBS script


Lord Alderaan

Recommended Posts

Posted

I wrote this vbs script a few months back because I was tired of filtering out the completed files/foldes from the still seeding ones in my downloads folder. I never released it before because it lacked proper explanations but I finally decided to add that.

This script acts as a (cheap) replacement to the often requested but never implemented 'move finished downloads to folder' option. In its current implementation you can simply remove finished torrents from µtorrent at leisure and then run this script to move those files/folders to an specified folder automatically.

This script is made to be run on the same computer as where µtorrent is running.

Installation:

Copy the code below into a new (text) file (use notepad), follow the written setup instructions and save it as a .vbs file. Then double click to execute.

This script will only move files and won't overwrite anything but I give no guarantees so use this script at your own risk.

The matching process with strange symbols and languages might be lacking and negative effects of that can include µtorrent complaining about missing files for those torrents. Also you should never rename torrents in the µtorrent list (results in same problem).

Upon execution this script will generate and open a textfile with the exact move actions it wants to take and will ask you to confirm before actually moving any files/folders.

Help

If you have any questions, doubts, errors, problems, just ask here.

Any feedback is appreciated.

' This application looks at all files and folders in the two specified directories.
' Then it makes contact with the utorrent webui and retrieves a list of torrents.
' If a file or folder doesn't have a matching torrent it will be marked to be moved to the move folders you specify even lower.
'
' This script can only be run on the same computer as where utorrent is running.
'
' DO NOT CHANGE THE NAMES OF TORRENTS IN µTORRENT. If you change the name of a
' torrent in utorrent itself this program will think the related files should be moved.
'
' This script will open a textfile with the exact move actions it wants to take and will ask you to confirm before actually moving any files/folders.
'
' SETUP:
' Enable the webui in the advanced webui preferences. Fill in a difficult username and password.
' You can also enable the guest account and use that username.
' Fill in the settings below.
' (You do not require webui.zip for this program to work.)
'
' TROUBLESHOOTING:
' If you get a 'Windows Scripting Host' error with 'The system cannot find the resource specified' this means the server timed out.
' You might have filled in the wrong IP or port or µtorrent might not be running.
'
' If you get 'The download of the specified resource has failed.' you probably forgot to enable the webui.
'
' If the webui returns 'invalid request' you probably enabled the webui alternative port but filled in your normal utorrent port here.
' If you enable the alternative port you need to fill that port in here.
' It is also posible you restricted webui access to certain IPs but didn't fill in your ip.
' Add your own IP and/or 127.0.0.1
'
' Most other errors should be pretty obvious.
'
' LICENSE:
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.
'
' GNU GENERAL PUBLIC LICENSE
' http://www.gnu.org/licenses/gpl.txt
'
' Copyright 2008 Tjores Maes
'
' Contact: lordalderaan@gmail.com
'
'
' SETTINGS:
'
'webui settings
ip="localhost" 'if you have to change this make sure you can access the folders below.
port="26854" ' If you use the webui alternative port fill that one in here. Otherwise fill in your utorrent port.
username="guest" 'webui login. Doesn't matter if its the guest one or the real one. CASE SENSITIVE
password="" ' leave empty if you use the guest login. CASE SENSITIVE


' utorrent downloads preferences (trailing backslash required!!)
'
'
' If you have enabled both folders options in utorrent then this application:
' * will find the 100% downloaded files/folders in the 'completed' folder and move those that have been removed from utorrent to the folder specified below
' * will find incomplete (less then 100%) canceled files/folders in the 'downloads' folder (as in the download was never finished and removed (without using the 'remove torrent and delete data' option) from utorrent) and often you will want to simply delete this data.
'
' In this case the following settings are recommended:
completed="M:\torrented\" 'the 'move completed torrents to' folder
move_unlisted_completed_to="M:\Unsorted\" 'move unlisted files/folders to (this folder has to exist)
downloads="M:\torrenting\" 'the 'Put new downloads in' folder
move_unlisted_downloads_to="M:\Todelete\" 'move unlisted files/folders to (this folder has to exist)
'
' If you only have the 'downloads' folder enabled then this application will find both removed 100% downloaded files/folders and incomplete (less then 100%) canceled files/folder in the folder and will not know which one is which.
' In this case the following settings are recommended (simply uncomment them by removing the 's at the start of each line):
' completed=""
' move_unlisted_completed_to=""
' downloads="D:\downloads\" 'the 'Put new downloads in' folder
' move_unlisted_downloads_to="D:\finished\" 'move unlisted files/folders to (this folder has to exist)


'END OF SETTINGS; start of code

Set oFS = CreateObject("Scripting.FilesystemObject")
Set WshShell = CreateObject("WScript.Shell")

Set torrents = CreateObject("Scripting.Dictionary")
tokendata=httpGET("http://" & ip & ":" & port & "/gui/token.html")
Set oRE = New RegExp
oRE.Global = False
oRE.IgnoreCase = True
oRE.Pattern = ".*<div[^>]*id=[""']token[""'][^>]*>([^<]*)</div>.*"
token=oRE.Replace(tokendata,"$1")
data=httpGET("http://" & ip & ":" & port & "/gui/?list=1&token=" & token)
a_data=Split(data,vbLf)
For Each line In a_data
If line = ",""torrents"": [" Then
torrentsJSON=true
End If
If torrentsJSON AND left(line,1) = "[" Then
tn_start=InStr(1,line,",""")+2
tn_end=InStr(tn_start,line,""",")
torrentname=Mid(line,tn_start,tn_end-tn_start)
torrents.Add torrentname, false
If right(line,2) = "]]" Then
torrentsJSON=false
End If
End if
i=i+1
Next
If UBound(torrents.Keys) = -1 Then
MsgBox "No torrents found. Possible webui error. The webui returned:" & vbNewLine & data, vbCritical, "Stopped"
Wscript.Quit
End If
Set temp = oFS.CreateTextFile("log_torrents.txt", True)
temp.Write "The following torrents where found running in uTorrent:" & vbNewLine & vbNewLine & Join(torrents.Keys,vbNewLine)
temp.Close
Set unfound = CreateObject("Scripting.Dictionary")
For Each key in torrents.Keys
unfound.Item(key) = torrents.Item(key)
Next
Set FilCompMoves = CreateObject("Scripting.Dictionary")
Set FolCompMoves = CreateObject("Scripting.Dictionary")
If oFS.FolderExists(completed) Then
If oFS.FolderExists(move_unlisted_completed_to) Then
Set o_fol = oFS.getFolder(completed)
Set c_fils = o_fol.Files
Set c_subfols = o_fol.SubFolders
For Each o_fil in c_fils
If torrents.Exists(o_fil.Name) then
If unfound.Exists(o_fil.Name) then
unfound.Remove(o_fil.Name)
End If
Else
FilCompMoves.Item(o_fil.Name) = true
End If
Next
For Each o_subfol in c_subfols
If torrents.Exists(o_subfol.Name) then
If unfound.Exists(o_subfol.Name) then
unfound.Remove(o_subfol.Name)
End If
Else
FolCompMoves.Item(o_subfol.Name) = true
End If
Next
Else
Msgbox move_unlisted_completed_to & " does not exist.", vbCritical, "Stopped"
Wscript.Quit
End If
End If
Set FilDownMoves = CreateObject("Scripting.Dictionary")
Set FolDownMoves = CreateObject("Scripting.Dictionary")
If oFS.FolderExists(downloads) Then
If oFS.FolderExists(move_unlisted_downloads_to) Then
Set o_fol = oFS.getFolder(downloads)
Set c_fils = o_fol.Files
Set c_subfols = o_fol.SubFolders
For Each o_fil in c_fils
fil_tor_name = o_fil.Name
If right(o_fil.Name,4) = ".!ut" then
fil_tor_name = Left(o_fil.Name,Len(o_fil.Name)-4)
End If
If torrents.Exists(fil_tor_name) then
If unfound.Exists(fil_tor_name) then
unfound.Remove(fil_tor_name)
End If
Else
FilDownMoves.Item(o_fil.Name) = true
End If
Next
For Each o_subfol in c_subfols
If torrents.Exists(o_subfol.Name) then
If unfound.Exists(o_subfol.Name) then
unfound.Remove(o_subfol.Name)
End If
Else
FolDownMoves.Item(o_subfol.Name) = true
End If
Next

Else
Msgbox move_unlisted_downloads_to & " does not exist.", vbCritical, "Stopped"
Wscript.Quit
End If
End If

Set temp = oFS.CreateTextFile("log.txt", True)
If UBound(unfound.Keys) > -1 Then
temp.Write "The following torrents where not found in " & completed & " or " & downloads & "." & vbNewLine & "If you are sure one of the torrents was downloaded to those folders there might have been a mismatch and you should cancel the move." & vbNewLine & vbNewLine & Join(unfound.Keys,vbNewLine) & vbNewLine & vbNewLine & vbNewLine
End If
temp.Write "The following files and folders are to be moved from " & downloads & " to " & move_unlisted_downloads_to & ":" & vbNewLine & vbNewLine & Join(FilDownMoves.Keys,vbNewLine) & vbNewLine & Join(FolDownMoves.Keys,vbNewLine)
temp.Write vbNewLine & vbNewLine & vbNewLine & "The following files and folders are to be moved from " & completed & " to " & move_unlisted_completed_to & ":" & vbNewLine & vbNewLine & Join(FilCompMoves.Keys,vbNewLine) & vbNewLine & Join(FolCompMoves.Keys,vbNewLine)
temp.Close
WshShell.Run ("log.txt")
If UBound(unfound.Keys) > -1 Then
Continue = MsgBox("Some torrents that are running could not be found in the download folders." & vbNewLine & "This usually is caused by torrents manual set to download to a different location." & vbNewLine & vbNewline & "HOWEVER THIS CAN ALSO MEAN YOU MANUALLY NAMED A TORRENT OR AN MATCH ERROR OCCURRED IN WHICH CASE A FILE OR FOLDER IS MARKED FOR MOVEMENT WHILE IT MIGHT STILL BE RUNNING IN UTORRENT!" & vbNewLine & vbNewLine & "See the text file that has been opened for more information." & vbNewLine & "Do you want to continue", vbYesNo, "Uh oh!")
If Continue <> vbYes Then
Wscript.quit
End If
Else
Continue = MsgBox("A text file was opened with a list of move actions." & vbNewLine & vbNewLine & "No errors occurred so far. Do you want to continue?", vbYesNo, "Continue?")
If Continue <> vbYes Then
Wscript.quit
End If
End If
Errorstr = ""
For Each Fil in FilDownMoves.Keys
If oFS.FileExists(move_unlisted_downloads_to & Fil) Then
Errorstr = Errorstr & vbScript & Fil & " allready exists in target folder. (" & move_unlisted_downloads_to & ")"
Else
oFS.MoveFile downloads & Fil, move_unlisted_downloads_to
FilDownMoves.Remove(Fil)
End If
Next
For Each Fol in FolDownMoves.Keys
If oFS.FolderExists(move_unlisted_downloads_to & Fol) Then
Errorstr = Errorstr & vbScript & Fol & " allready exists in target folder. (" & move_unlisted_downloads_to & ")"
Else
oFS.MoveFolder downloads & Fol, move_unlisted_downloads_to
FolDownMoves.Remove(Fol)
End If
Next
For Each Fil in FilCompMoves.Keys
If oFS.FileExists(move_unlisted_completed_to & Fil) Then
Errorstr = Errorstr & vbScript & Fil & " allready exists in target folder. (" & move_unlisted_completed_to & ")"
Else
oFS.MoveFile completed & Fil, move_unlisted_completed_to
FilCompMoves.Remove(Fil)
End If
Next
For Each Fol in FolCompMoves.Keys
If oFS.FolderExists(move_unlisted_completed_to & Fol) Then
Errorstr = Errorstr & vbScript & Fol & " allready exists in target folder. (" & move_unlisted_completed_to & ")"
Else
oFS.MoveFolder completed & Fol, move_unlisted_completed_to
FolCompMoves.Remove(Fol)
End If
Next
If Errorstr <> "" Then
Set temp = oFS.CreateTextFile("error.txt", True)
temp.Write Errorstr
temp.Close
WshShell.Run ("error.txt")
End If
Msgbox "Done"
Function httpGET(url)
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", url, False, username, password
http.send
httpGET = http.responseText
End Function

Token support added on 2009-05-25.

Fixed torrent name parser bug 2010-03-03

Development on this project has stopped.

Feel free to use it as inspiration for your own vbs app.

If you would like to share your app please make a new topic.

  • 7 months later...
Posted

If you have any labels you receive an error 800A0005 - Invalid procedure call or argument: 'Mid'.

The utorrent WebUI outputs these at the top of the page called

With a label called test:

{"build":12639,"label": [
["test",1]
]
,"torrents": [

Without any labels:

{"build":12639,"label": [
]
,"torrents": [

Also if you have 2 torrents with the same name it causes problems (When I download a torrent from one tracker and want to help seed a duplicate on another tracker) but that is to be expected I guess. Overall good work and you have certainly helped me.

Posted

I've advanced this little script into a large automation project of mine which is so customized it wouldn't be usefull to anyone if I posted it. I had already solved the label problem but never ran into the double name problem.

I've changed the code above with a fix for both but I'm not 100% sure it'll work perfectly.

Lemme know of any other problems and I'll debug.

Posted

Automation to the point where newly completed downloads are unrared and copied to a NAS with the correct folder structure and naming convention pulled down from an online database by any chance??

If not its cool, but that's the kinda thing I'm after.

Posted

Automated to the point that public torrents get auto removed once they reach 1.05. Private torrents get auto-labeled and get added to a second instance running on a second machine connected to my second internet connection for seeding once the download completes.

I'm looking into extracting and moving to specific folders etc but I haven't found trustworthy conventions of separating my different types of downloads (mvids, movies, series, anime, games, etc).

Posted

Sweet as, I might keep modifying to my needs and I'll let you know if I find an way to do the rest. For now the fix for the duplicate names is this:

For Each line In a_data
If line = ",""torrents"": [" Then
torrentsJSON=true
End If
If torrentsJSON AND left(line,1) = "[" Then
tn_start=InStr(1,line,",""")+2
tn_end=InStrRev(line,""",",InStrRev(line,""","))
torrentname=Mid(line,tn_start,tn_end-tn_start)
If torrents.Exists(torrentname) = "False" Then
torrents.Add torrentname, false
End if
End if
i=i+1
Next

Posted

I'm also using both vbs and php now.

Solved the 2nd duplicate names related bug, I hope.

[edit]

2009-05-25

In view of the enforcement of token authorization I've added token support to this app.

I also added a note to make it clear that I do not intend to continue developing this app. If anyone else wants to continue or create their own variant feel free to use my code as a basis.

But please start a new topic.

  • 1 year later...
Posted

I did some changes to this VBS script to use it automatically everyday in Windows Task Scheduler. Maybe this version will be useful for somebody.

List of changes:

- Disabled all messages and confirmations

- Disabled creation of files log.txt, log_torrents.txt and error.txt

- Disabled exception, raised in function httpGET when WebUI doesn't work

- Option "delete_after_move" - to DELETE ALL files and folders from destination folder after moving (ENABLED BY DEFAULT!)

- Option "log_file_name" - file name, where to write date/time of script execution and list of deleted files/folders

' This application looks at all files and folders in the two specified directories.
' Then it makes contact with the utorrent webui and retrieves a list of torrents.
' If a file or folder doesn't have a matching torrent it will be marked to be moved to the move folders you specify even lower.
'
' This script can only be run on the same computer as where utorrent is running.
'
' DO NOT CHANGE THE NAMES OF TORRENTS IN uTORRENT. If you change the name of a
' torrent in utorrent itself this program will think the related files should be moved.
'
' This script will open a textfile with the exact move actions it wants to take and will ask you to confirm before actually moving any files/folders.
'
' SETUP:
' Enable the webui in the advanced webui preferences. Fill in a difficult username and password.
' You can also enable the guest account and use that username.
' Fill in the settings below.
' (You do not require webui.zip for this program to work.)
'
' TROUBLESHOOTING:
' If you get a 'Windows Scripting Host' error with 'The system cannot find the resource specified' this means the server timed out.
' You might have filled in the wrong IP or port or utorrent might not be running.
'
' If you get 'The download of the specified resource has failed.' you probably forgot to enable the webui.
'
' If the webui returns 'invalid request' you probably enabled the webui alternative port but filled in your normal utorrent port here.
' If you enable the alternative port you need to fill that port in here.
' It is also posible you restricted webui access to certain IPs but didn't fill in your ip.
' Add your own IP and/or 127.0.0.1
'
' Most other errors should be pretty obvious.
'
' LICENSE:
'
' This program is free software: you can redistribute it and/or modify
' it under the terms of the GNU General Public License as published by
' the Free Software Foundation, either version 3 of the License, or
' (at your option) any later version.
'
' This program is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
' GNU General Public License for more details.
'
' You should have received a copy of the GNU General Public License
' along with this program. If not, see <http://www.gnu.org/licenses/>.
'
' GNU GENERAL PUBLIC LICENSE
' http://www.gnu.org/licenses/gpl.txt
'
' Copyright 2008 Tjores Maes
'
' Contact: lordalderaan@gmail.com
'
'
' SETTINGS:
'
'webui settings
ip="localhost" 'if you have to change this make sure you can access the folders below.
port="56666" ' If you use the webui alternative port fill that one in here. Otherwise fill in your utorrent port.
username="" 'webui login. Doesn't matter if its the guest one or the real one. CASE SENSITIVE
password="" ' leave empty if you use the guest login. CASE SENSITIVE
delete_after_move=True 'if True, DELETE ALL files and folders from destination folders afer moving

' utorrent downloads preferences (trailing backslash required!!)
'
'
' If you have enabled both folders options in utorrent then this application:
' * will find the 100% downloaded files/folders in the 'completed' folder and move those that have been removed from utorrent to the folder specified below
' * will find incomplete (less then 100%) canceled files/folders in the 'downloads' folder (as in the download was never finished and removed (without using the 'remove torrent and delete data' option) from utorrent) and often you will want to simply delete this data.
'
' In this case the following settings are recommended:
completed="E:\torrent\all\done\" 'the 'move completed torrents to' folder
move_unlisted_completed_to="E:\torrent\all\delete\" 'move unlisted files/folders to (this folder has to exist)
downloads="E:\torrent\all\work\" 'the 'Put new downloads in' folder
move_unlisted_downloads_to="E:\torrent\all\delete\" 'move unlisted files/folders to (this folder has to exist)
log_file_name="E:\torrent\all\deleted.log" 'the log file with list of deleted files/folders'
'
' If you only have the 'downloads' folder enabled then this application will find both removed 100% downloaded files/folders and incomplete (less then 100%) canceled files/folder in the folder and will not know which one is which.
' In this case the following settings are recommended (simply uncomment them by removing the 's at the start of each line):
' completed=""
' move_unlisted_completed_to=""
' downloads="D:\downloads\" 'the 'Put new downloads in' folder
' move_unlisted_downloads_to="D:\finished\" 'move unlisted files/folders to (this folder has to exist)


'END OF SETTINGS; start of code

Set oFS = CreateObject("Scripting.FilesystemObject")
Set WshShell = CreateObject("WScript.Shell")

Set torrents = CreateObject("Scripting.Dictionary")
tokendata=httpGET("http://" & ip & ":" & port & "/gui/token.html")
Set oRE = New RegExp
oRE.Global = False
oRE.IgnoreCase = True
oRE.Pattern = ".*<div[^>]*id=[""']token[""'][^>]*>([^<]*)</div>.*"
token=oRE.Replace(tokendata,"$1")
data=httpGET("http://" & ip & ":" & port & "/gui/?list=1&token=" & token)
a_data=Split(data,vbLf)
For Each line In a_data
If line = ",""torrents"": [" Then
torrentsJSON=true
End If
If torrentsJSON AND left(line,1) = "[" Then
tn_start=InStr(1,line,",""")+2
tn_end=InStr(tn_start,line,""",")
torrentname=Mid(line,tn_start,tn_end-tn_start)
torrents.Add torrentname, false
If right(line,2) = "]]" Then
torrentsJSON=false
End If
End if
i=i+1
Next
If UBound(torrents.Keys) = -1 Then
Wscript.Quit
End If
Set unfound = CreateObject("Scripting.Dictionary")
For Each key in torrents.Keys
unfound.Item(key) = torrents.Item(key)
Next
Set FilCompMoves = CreateObject("Scripting.Dictionary")
Set FolCompMoves = CreateObject("Scripting.Dictionary")
If oFS.FolderExists(completed) Then
If oFS.FolderExists(move_unlisted_completed_to) Then
Set o_fol = oFS.getFolder(completed)
Set c_fils = o_fol.Files
Set c_subfols = o_fol.SubFolders
For Each o_fil in c_fils
If torrents.Exists(o_fil.Name) then
If unfound.Exists(o_fil.Name) then
unfound.Remove(o_fil.Name)
End If
Else
FilCompMoves.Item(o_fil.Name) = true
End If
Next
For Each o_subfol in c_subfols
If torrents.Exists(o_subfol.Name) then
If unfound.Exists(o_subfol.Name) then
unfound.Remove(o_subfol.Name)
End If
Else
FolCompMoves.Item(o_subfol.Name) = true
End If
Next
Else
Wscript.Quit
End If
End If
Set FilDownMoves = CreateObject("Scripting.Dictionary")
Set FolDownMoves = CreateObject("Scripting.Dictionary")
If oFS.FolderExists(downloads) Then
If oFS.FolderExists(move_unlisted_downloads_to) Then
Set o_fol = oFS.getFolder(downloads)
Set c_fils = o_fol.Files
Set c_subfols = o_fol.SubFolders
For Each o_fil in c_fils
fil_tor_name = o_fil.Name
If right(o_fil.Name,4) = ".!ut" then
fil_tor_name = Left(o_fil.Name,Len(o_fil.Name)-4)
End If
If torrents.Exists(fil_tor_name) then
If unfound.Exists(fil_tor_name) then
unfound.Remove(fil_tor_name)
End If
Else
FilDownMoves.Item(o_fil.Name) = true
End If
Next
For Each o_subfol in c_subfols
If torrents.Exists(o_subfol.Name) then
If unfound.Exists(o_subfol.Name) then
unfound.Remove(o_subfol.Name)
End If
Else
FolDownMoves.Item(o_subfol.Name) = true
End If
Next

Else
Wscript.Quit
End If
End If

Errorstr = ""
Set log_file = oFS.OpenTextFile(log_file_name, 8, True)
log_file.Write " " & FormatDateTime(Date+Time) & vbNewLine

For Each Fil in FilDownMoves.Keys
If oFS.FileExists(move_unlisted_downloads_to & Fil) Then
Errorstr = Errorstr & vbScript & Fil & " allready exists in target folder. (" & move_unlisted_downloads_to & ")"
Else
oFS.MoveFile downloads & Fil, move_unlisted_downloads_to
log_file.Write Fil & vbNewLine
FilDownMoves.Remove(Fil)
End If
Next
For Each Fol in FolDownMoves.Keys
If oFS.FolderExists(move_unlisted_downloads_to & Fol) Then
Errorstr = Errorstr & vbScript & Fol & " allready exists in target folder. (" & move_unlisted_downloads_to & ")"
Else
oFS.MoveFolder downloads & Fol, move_unlisted_downloads_to
log_file.Write Fol & vbNewLine
FolDownMoves.Remove(Fol)
End If
Next
For Each Fil in FilCompMoves.Keys
If oFS.FileExists(move_unlisted_completed_to & Fil) Then
Errorstr = Errorstr & vbScript & Fil & " allready exists in target folder. (" & move_unlisted_completed_to & ")"
Else
oFS.MoveFile completed & Fil, move_unlisted_completed_to
log_file.Write Fil & vbNewLine
FilCompMoves.Remove(Fil)
End If
Next
For Each Fol in FolCompMoves.Keys
If oFS.FolderExists(move_unlisted_completed_to & Fol) Then
Errorstr = Errorstr & vbScript & Fol & " allready exists in target folder. (" & move_unlisted_completed_to & ")"
Else
oFS.MoveFolder completed & Fol, move_unlisted_completed_to
log_file.Write Fol & vbNewLine
FolCompMoves.Remove(Fol)
End If
Next
log_file.Close

If delete_after_move Then
oFS.DeleteFolder move_unlisted_completed_to & "\*", 1
oFS.DeleteFile move_unlisted_completed_to & "\*", 1
oFS.DeleteFolder move_unlisted_downloads_to & "\*", 1
oFS.DeleteFile move_unlisted_downloads_to & "\*", 1
End If

Function httpGET(url)
Set http = CreateObject("MSXML2.XMLHTTP")
http.Open "GET", url, False, username, password

On Error resume next
http.send
if Err.Number<>0 then
Wscript.Quit
end if
On Error goto 0

httpGET = http.responseText
End Function

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...