You could use python libs for this use case, e.g. os, shutil etc.
Have a look at this example.
I created some dummy folders, split them randomly by 80-20 and move the 20% split into another folder.
Just change the splitting in the way you would like.
folders_path = os.path.join('YOUR', 'PATH')
folders = np.array(glob.glob(os.path.join(folders_path, '*')))

nb_folders = len(folders)
folder_idx = np.arange(nb_folders)
np.random.shuffle(folder_idx)

folders_train = folders[folder_idx[:int(nb_folders*0.8)]]
folders_test = folders[folder_idx[int(nb_folders*0.8):]]

dest_folder = './'
for folder in folders_test:
    print('Moving {} to {}'.format(folder, dest_folder))
    shutil.move(folder, dest_folder)