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
Support
General Support
Any way to automate moving each movie into its own folder?
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="ppersaud" data-source="post: 350652" data-attributes="member: 86411"><p><strong>Make a Folder for Each Movie</strong></p><p></p><p>I found this script on the internet and it works great:</p><p></p><p>Option Explicit</p><p>Dim objFSO,srcRoot,objFolder,File,dstRoot,theName,dst,dstFile</p><p>Set objFSO=CreateObject("Scripting.FileSystemObject")</p><p>srcRoot="\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz"</p><p>dstRoot="\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz"</p><p>Set objFolder=objFSO.GetFolder(srcRoot)</p><p>For Each File In objFolder.Files</p><p>If objFSO.GetExtensionName(File) = "avi" Then</p><p>theName= Split(File.Name, ".")(0) </p><p>dst=dstRoot & "\" & theName</p><p>dstFile=dst & "\" & File.Name</p><p>If Not objFSO.FolderExists(dst) Then</p><p>objFSO.CreateFolder(dst)</p><p>End If</p><p>objFSO.MoveFile File, dstFile</p><p>End If</p><p></p><p></p><p>Paste the above script in notepad and save it with a .vbs extension: Makemoviefolder.vbs</p><p></p><p>Change the source path (srcRoot=). I have "\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz" in the script above. You could use "C:\My Documents\My Videos".</p><p></p><p>Change the destination path (dstRoot=). I have "\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz" in the script above. You could use "C:\My Documents\My Videos".</p><p></p><p>Change the file extension to the appropriate extension (mpg, vob, avi) on the line with "objFSO.GetExtensionName(File) = "avi"". I have avi in the script above.</p><p></p><p>Open a command line interface. You can do this by typing "cmd" in the run (XP) or text box on the start button (Vista). </p><p></p><p>run the script using the using the "cscript" command. Example: cscript c:\temp\makemoviefolder.vbs</p><p></p><p>It worked for me on my Windows Home Server using a client machine to run the script as you can see from the code above. Use at your own risk, but you can see the code and it is pretty straight forward. </p><p></p><p>Regards, <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>Philippe</p></blockquote><p></p>
[QUOTE="ppersaud, post: 350652, member: 86411"] [b]Make a Folder for Each Movie[/b] I found this script on the internet and it works great: Option Explicit Dim objFSO,srcRoot,objFolder,File,dstRoot,theName,dst,dstFile Set objFSO=CreateObject("Scripting.FileSystemObject") srcRoot="\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz" dstRoot="\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz" Set objFolder=objFSO.GetFolder(srcRoot) For Each File In objFolder.Files If objFSO.GetExtensionName(File) = "avi" Then theName= Split(File.Name, ".")(0) dst=dstRoot & "\" & theName dstFile=dst & "\" & File.Name If Not objFSO.FolderExists(dst) Then objFSO.CreateFolder(dst) End If objFSO.MoveFile File, dstFile End If Paste the above script in notepad and save it with a .vbs extension: Makemoviefolder.vbs Change the source path (srcRoot=). I have "\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz" in the script above. You could use "C:\My Documents\My Videos". Change the destination path (dstRoot=). I have "\\Server\videos\New Rips\zzzzzzzzzzzzzzzzzzzz" in the script above. You could use "C:\My Documents\My Videos". Change the file extension to the appropriate extension (mpg, vob, avi) on the line with "objFSO.GetExtensionName(File) = "avi"". I have avi in the script above. Open a command line interface. You can do this by typing "cmd" in the run (XP) or text box on the start button (Vista). run the script using the using the "cscript" command. Example: cscript c:\temp\makemoviefolder.vbs It worked for me on my Windows Home Server using a client machine to run the script as you can see from the code above. Use at your own risk, but you can see the code and it is pretty straight forward. Regards, :) Philippe [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
General Support
Any way to automate moving each movie into its own folder?
Contact us
RSS
Top
Bottom