Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On Linux I can create a large number of small files from the command line for various testing purposes:

for x in {1..100}
head -n 512 /dev/urandom > file_$x

What's the best way to achieve something similar on Windows?

share|improve this question
This is one of many million reasons why Linux rocks. There might be a proper answer to this one, but I use Python a lot to compensate for the lack of features in Windows. – tovare Jul 20 '10 at 0:10
up vote 2 down vote accepted


  1. Create the files on a Linux box and copy/move them to the Windows box.
  2. Use /dev/urandom from Cygwin
  3. Python's os.urandom() calls Windows' internal cryptographically secure pseudo-random number generator
share|improve this answer
python it is then. – anthony Jul 23 '10 at 21:51

You could possibly copy some of the random files in your TEMP directory if you really don't care about the content of the files that you use for testing. From the command prompt:


...takes you to the temp directory which usually contains plenty of files, although you might need to ignore the ones which are 0kb if these are useless to you.

Copy files from this directory to the directory from which you need to test whatever it is that you are testing?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.