Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 84515
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:56:36+00:00 2026-05-10T21:56:36+00:00

for testing purposes i need an recursive directory with some files, that comes to

  • 0

for testing purposes i need an recursive directory with some files, that comes to maximum path-length.

The Script used for the creation consists only of two for-loops, as followed:

for /L %%a in (1 1 255) do @(     mkdir %%a     && cd %%a     && for /L %%b in (1 1 %random%) do @(             echo %%b >> %%a.txt         ) ) 

Now I would like to embed this script as part of another script, since more is to be done, but I can not add any other commands around it or it refuses working. I use this under windows vista, if this is useful to you.

Nor it works if i write '@ECHO OFF‘ in first line, neither with ‘echo done‘ on the last line.

output on commandline is:

X:\Scripte>recursive.cmd OFFfor /L %a in (1 1 255) do @( mkdir %a The system cannot find the path specified. 

EDIT: Seems to be a problem with layer 8, the problem seems to be in the command shell used, if used the bare cmd.exe, it works, with visual studio 2008 command shell it does not work, like stated above.

anyway, thank you.

  • 1 1 Answer
  • 1 View
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T21:56:36+00:00Added an answer on May 10, 2026 at 9:56 pm

    I don’t think you need the ‘@’s in front of the parens or the ‘&&’ within the for loop body; the parens take care of handling multiple statements in the for loop.

    The following works for me:

    @echo OFF  for /L %%a in (1 1 255) do (     @echo a = %%a     mkdir %%a     cd %%a     for /L %%b in (1 1 %random%) do (         echo %%b >> %%a.txt     ) )  @echo done 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For testing purposes I need to create sets of text files that have similar
For testing purposes, I need to share some definitions between Tcl and C. Is
For testing purposes, I need to find two 64-bit integer values that exactly multiply
I need to convert a PDF file to images. I used for testing purposes
For testing purposes I need to be sure that certain methods are not inlined
For testing purposes I need strings such as: test\x00string I would like to loop
For testing purposes I have this shell script #!/bin/bash echo $$ find / >/dev/null
Where should I put test data that is for RSpec testing purposes only?
When I use this code to download this image (only used for testing purposes),
For testing purposes of a RandomGen -reliant function I need a RandomGen instance which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.