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

  • Home
  • SEARCH
  • 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
  • 0 Views
  • 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

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer The ListView.View property is a dependency property, so you should… May 11, 2026 at 10:00 am
  • added an answer This would generally be handled via IIS configuration or with… May 11, 2026 at 10:00 am
  • added an answer It's perfectly 'safe' to delete a null pointer; it effectively… May 11, 2026 at 10:00 am

Related Questions

for testing purposes i need an recursive directory with some files, that comes to
For testing purposes I need to get my Outlook 2003 addin (vb.net) disabled so
For testing purposes I need to create sets of text files that have similar
For testing purposes I need my ABAP program to wait for few seconds. How
For testing purposes I have to generate a file of a certain size (to
For testing purposes I want send mail to my localhost user account rather than
For testing purposes I'm planning to put together a little app that will listen
I'm writing a basic Django application. For testing / development purposes I'm trying to
I created a new SharePoint portal for testing purposes using a manually added HOSTS
I have a php server that is running my domain name. For testing purposes

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.