Split folder contents into subfolders containing 200 items per folder


  1. Posts : 11
    win 10
       #1

    Split folder contents into subfolders containing 200 items per folder


    Hi. I'm a musician and I've run into a slight problem that may be solvable via windows 10. This morning I booted up my copy of Ableton Live and opened up a copy of Remidi 2 as a VST plugin. This probably seems irrelevant but I'm just putting things into context. I loaded up some midi files and off I went. However, I went to a directory containing midi files and Ableton live locked up. After several hours of faffing around I worked out that Remidi 2 was struggling to cope with the 169 thousand plus files in the directory that I was using. So I spent an hour or 2 breaking the files into folders 0 to 10 and a to Z thinking this may sort it. However, as some of the folders still contain 5000+ files Remidi is still struggling to read them so I was wondering if there was a way in Windows 10 to batch create a number of folders and move say 200 to 250 files to each subfolder. I did a lot of googling hoping I could find some form of software to do this and then it occurred to me that this may be possible in windows 10 somehow. Any ideas?
    I'm using windows 10 home version 10.0.19042 Build 19042
      My Computer


  2. Posts : 4,595
    several
       #2

    You could probabaly use a batch file to create the folders and move say 500 files into each.

    I havent tested this but looks like it would work. Change 500 to how many files you want in each folder, and change .mp4 to whatever extension your music files have. Copy and paste the code into a text file file and save it as copyfiles.cmd

    Code:
    @echo off
    SETLOCAL ENABLEDELAYEDEXPANSION
    set fileCount=500
    set filesNow=0
    set nameStart=000
    set nameEnd=000
    FOR /F "usebackq delims=" %%i IN (`dir /b *.mp4`) do (
        set /a filesNow+=1
        set /a tmpValue=filesNow %% fileCount
        if "!tmpValue!"=="1" (
            set "nameStart=%%~ni"
            mkdir _tmpDir_
        )
        move %%~nxi _tmpDir_\
        if "!tmpValue!"=="0" (
            rename _tmpDir_ !nameStart!-%%~ni
        )
        set "nameEnd=%%~ni"
    )
    
    if exist _tmpDir_ rename _tmpDir_ %nameStart%-%nameEnd%
      My Computer


  3. Posts : 43,015
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #3

    This looks very like the sort of thing you describe:
    Automatically Move Files Into Directories - gHacks Tech News

    The program may work well if you want to divide a large file collection, music, videos or images for instance, into multiple folders to speed up the loading and browsing of the folder on the system.
    Note the caveats about availability and support etc. There seem to be two options on offer.

    Here's another - Folder axe
    Split Big Size Folder into multiple folders

    Note- such useful utilities tend to end up being unsupported after long enough..
      My Computers


  4. Posts : 4,595
    several
       #4

    That will be easier.
      My Computer


  5. Posts : 11
    win 10
    Thread Starter
       #5

    Used The Axe


    I used the folder axe program after a few false starts. The official download page only seems to have corrupted versions of the files but I found it somewhere and it's great. Does everything I wanted it to.

    I was interested in the batch idea too but, looking at the code, couldn't see where it would ask for the directory to work and directories created. Then again though, I've only used BAT programs infrequently so don't really understand the lingo. Thanks everyone for your help. I'm off to split hundreds of thousands of files into batches of 200 now
      My Computer


  6. Posts : 43,015
    Win 10 Pro (22H2) (2nd PC is 22H2)
       #6

    Hope it goes well. Make sure you have a full backup, just in case.
      My Computers


  7. Posts : 27
    Windows 10
       #7

    Can use non corrupted version of folder axe please


    So far I've only managed to find a corrupted version of folder access if someone could perhaps let me know if they have one I'd be happy to provide my email address or figure something out. Thank you very much, Peter


    mmmreece said:
    I used the folder axe program after a few false starts. The official download page only seems to have corrupted versions of the files but I found it somewhere and it's great. Does everything I wanted it to.

    I was interested in the batch idea too but, looking at the code, couldn't see where it would ask for the directory to work and directories created. Then again though, I've only used BAT programs infrequently so don't really understand the lingo. Thanks everyone for your help. I'm off to split hundreds of thousands of files into batches of 200 now
      My Computer


  8. Posts : 11
    win 10
    Thread Starter
       #8

    I just searched for folder axe in my web history and it looks like I got it from a site called Lo4D.com . If this doesn't work, just post again and I'll look a bit more deeply. Failing that I'll see if I can find the original download.
      My Computer


  9. Posts : 27
    Windows 10
       #9

    Thank you , I got version 7 I found. Appreciate your help!!!!!!


    mmmreece said:
    I just searched for folder axe in my web history and it looks like I got it from a site called Lo4D.com . If this doesn't work, just post again and I'll look a bit more deeply. Failing that I'll see if I can find the original download.
      My Computer


 

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

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




Windows 10 Forums