-2

I am in a strange situation... I get a large number of files (XML or Excel)... I store it in a folder.

But, I need to split it into smaller batches and give it to my team members, so that they can work on those files.

So, I want to create a Macro that can split the folder (for example 1000 files) into about 10 folders with 100 files in each of them.

Is this possible? could you please guide me.

Pᴇʜ
  • 56,719
  • 10
  • 49
  • 73

2 Answers2

1

You can loop through a folder in vba: Check this question

It's also possible to create folders using mkdir: https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/mkdir-statement

And it's possible to move files from one folder to another, check this site (really helpfull site in general by the way)

This should get you going:)

Alex de Jong
  • 1,257
  • 1
  • 11
  • 23
-2

I have seen various versions of shell scripting (including PowerShell) that can split documents themselves (csv, dat, etc.) into many other files. As well as scripting that can loop through the contents of a directory and archive them, format them, etc.

I don't have a sample readily available, but it is possible to create a script to do such a thing for you. Now whether you have the admin privileges to execute such a script is another question all together.

wolfsshield
  • 757
  • 5
  • 14