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 9133799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:32:58+00:00 2026-06-17T08:32:58+00:00

{ char foldername[15]; printf(Enter the foldername); scanf(%s, foldername); char command[100]; sprintf(command, cacls %s /e

  • 0
{
  char foldername[15];
  printf("Enter the foldername");
  scanf("%s", foldername);
  char command[100];
  sprintf(command, "cacls %s /e /p everyone:n",foldername);
  system(command);
  return 0;
}

This is the code, i want to manually input the location of the folder , but i don’t know how .

  • 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. Editorial Team
    Editorial Team
    2026-06-17T08:32:59+00:00Added an answer on June 17, 2026 at 8:32 am

    Here you can increase array size

    char foldername[100];
    

    and can give full path of folder.

    Currently your giving foldername as “stackoverflow_example“

    then you can give as

    /home/user/projects/stackoverflow_example
    

    it will work

    AS YOUR comment:

    it works ! but for code to work , i need the executable file at the 
    target folder directory, but i need to simply execute the code 
    from anywhere in computer to any folder in computer, by manually 
    giving location as input. 
    

    Now you can execute the code from anywhere in computer if you give full path.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using this simple C code: char * command = NULL; sprintf (command, ls
Char info[256]=Apple,iPhone,iPad; I want to search in this char array, for example, search iPhone
char a[10]; scanf(%s,a); int i=0; while(a[i]!='\0') printf(\n%c,a[i++]); //similar to printf(%s,a); char *b; b=malloc(10*sizeof(char)); scanf(%s,b);
{ char bufBef[32]; char buf[8]; char bufAfter[32]; sprintf(buf,AAAAAAA\0); buf[8]='\0'; printf(%s\n,buf); } On Windows 7,
char buffer[10]; strcat(buffer, hi); printf(%s, buffer); In the above code, it prints some weird
char *str1 = malloc(256*sizeof(char)); char *str2 = stack for (i=0;i<15;i++){ sprintf(str1,%s%s,str1,str2); } printf(%s\n,str1); I'm
char bytes[0x7FFFFFFF]; /* this? */ int main() { return 0; } Over 2Gb? (if
char name[50]; int valid; do{ valid=1; printf(Enter name for Salesman: ); fgets(name,50,stdin); if(!isalpha(*name)) //it
char dict[N][M]; for(i = 0; i < N; i++) { do { printf(enter word
char imei_temp[14] = {0, }; strcpy(imei_temp, 00000000000000); According to my understanding this is valid

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.