[Help] Batch File move every 15.000 files to another folders

Page 2 of 2 FirstFirst 12

  1. Posts : 6,458
    x64 (6.3.9600) Win8.1 Pro & soon dual boot x64 (6.1.7601) Win7_SP1 HomePrem
       #11

    Well, I gave up... sort of.

    I finished fooling around with batch scripts, but still could not find a clean way to break the loop (a problem with command)

    I thought that PowerShell might be a better option and did some research, but did not write anything for you to use. I spent too much time with batch and thought "Hey maybe if I just point SevenDP to PowerShell, he/she might be able to figure it out from there - the OP seems intelligent enough".

    Here are some links that might get you started. I don't think PowerShell has the same problem with breaking out of loops that the command shell has.

    Windows PowerShell Owner's Manual
    Scripting with Windows PowerShell
    Windows PowerShell Scripting

    Loop examples
    ForEach | PowerShell | SS64.com
    powershell - Loop X number of times - Stack Overflow
    Hey, Scripting Guy! How Can I Loop Through Collections with Windows PowerShell? - Hey, Scripting Guy! Blog - Site Home - TechNet Blogs

    The attached batch file is something you can paly with if you wish, but you'll be better off spending the time on Powershell.

    If you don't understand something in the batch file (not well documented) ask and I'll try to explain what I wanted it to do. It's somewhat convoluted in the recursion call and I had to just exit the batch file to break the loop.

    Run some tests (it only moves 3 files but there is a variable you can change) I think I left all of the echos on, so the output isn't' pretty.

    Bill
    .
    [Help] Batch File move every 15.000 files to another folders Attached Files
      My Computer


 
Page 2 of 2 FirstFirst 12

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:41.
Find Us