home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Talk
simple vbscript to sort your files
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="rolls1400" data-source="post: 197630" data-attributes="member: 55504"><p>I created a script to move all my files from my torrent folder to there correct folder. It checks the filename ("smallville")then sends it to the corresponding folder "\\MEDIACENTER\Documents\My Movies\TV Shows". Make sure to replace all of the filenames and directories, also just duplicate this code </p><p></p><p>[CODE]Case InStr(LCase(sFile),LCase("example")) <> 0</p><p> sDestinationFolder = "\\MEDIACENTER\Documents\example"[/CODE]</p><p></p><p>if you want to setup multiple paths.I am sure alot of people know how to do this but if you dont it makes things ALOT easier!! I am new to vb so if anyone has anything to add that would be great!!</p><p></p><p></p><p><span style="font-size: 12px">Just paste in notepad than save the file as "whatever.vbs" (use quotations)</span> Change the red text inside quotations.</p><p></p><p>[CODE]Dim sOriginFolder, sDestinationFolder, sFile, oFSO</p><p>Set oFSO = CreateObject("Scripting.FileSystemObject")</p><p>sOriginFolder = "C:\Documents and Settings\All Users\Documents\My Torrents"</p><p>sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\Movies"</p><p>For Each sFile In oFSO.GetFolder(sOriginFolder).Files</p><p>Select Case True</p><p> [COLOR="Red"]Case InStr(LCase(sFile),LCase("axxo")) <> 0</p><p> sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\Movies"</p><p> Case InStr(LCase(sFile),LCase("survivor")) <> 0</p><p> sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\My TV Series\Survivor"</p><p> Case InStr(LCase(sFile),LCase("smallville")) <> 0</p><p> sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\My TV Series\Smallville"[/COLOR]</p><p> Case Else</p><p>End Select </p><p> If Not oFSO.FileExists(sDestinationFolder & "\" & oFSO.GetFileName(sFile)) Then</p><p> oFSO.GetFile(sFile).Copy sDestinationFolder & "\" & oFSO.GetFileName(sFile),True</p><p> End If</p><p>Next</p><p></p><p>WScript.Echo "Copying : All the files have been " & sMorC & " to " & sDestinationFolder [/CODE]</p></blockquote><p></p>
[QUOTE="rolls1400, post: 197630, member: 55504"] I created a script to move all my files from my torrent folder to there correct folder. It checks the filename ("smallville")then sends it to the corresponding folder "\\MEDIACENTER\Documents\My Movies\TV Shows". Make sure to replace all of the filenames and directories, also just duplicate this code [CODE]Case InStr(LCase(sFile),LCase("example")) <> 0 sDestinationFolder = "\\MEDIACENTER\Documents\example"[/CODE] if you want to setup multiple paths.I am sure alot of people know how to do this but if you dont it makes things ALOT easier!! I am new to vb so if anyone has anything to add that would be great!! [SIZE="3"]Just paste in notepad than save the file as "whatever.vbs" (use quotations)[/SIZE] Change the red text inside quotations. [CODE]Dim sOriginFolder, sDestinationFolder, sFile, oFSO Set oFSO = CreateObject("Scripting.FileSystemObject") sOriginFolder = "C:\Documents and Settings\All Users\Documents\My Torrents" sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\Movies" For Each sFile In oFSO.GetFolder(sOriginFolder).Files Select Case True [COLOR="Red"]Case InStr(LCase(sFile),LCase("axxo")) <> 0 sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\Movies" Case InStr(LCase(sFile),LCase("survivor")) <> 0 sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\My TV Series\Survivor" Case InStr(LCase(sFile),LCase("smallville")) <> 0 sDestinationFolder = "\\MEDIACENTER\Documents\My Movies\My TV Series\Smallville"[/COLOR] Case Else End Select If Not oFSO.FileExists(sDestinationFolder & "\" & oFSO.GetFileName(sFile)) Then oFSO.GetFile(sFile).Copy sDestinationFolder & "\" & oFSO.GetFileName(sFile),True End If Next WScript.Echo "Copying : All the files have been " & sMorC & " to " & sDestinationFolder [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Talk
simple vbscript to sort your files
Contact us
RSS
Top
Bottom