473,396 Members | 1,933 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

To run dos commands in C programming

hi all,
i want to create a folder add1 inside add, add is in current directory.
Expand|Select|Wrap|Line Numbers
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3. void main()
  4. {
  5. system("cd add");
  6. system("md add1");
  7. }
  8.  
pls find me answer for this...
thanks
Apr 4 '08 #1
2 1666
sicarie
4,677 Expert Mod 4TB
Does that not work? What errors are you getting?

PS - you may find you are getting compiler errors from a non-standard setup, I'd recommend using int main() to start your program.
Apr 4 '08 #2
compman9902
105 100+
Since you have attempted the code, I think that it is okay for me to help you out using code.
Try this:
Expand|Select|Wrap|Line Numbers
  1. system("MKDIR \"C:\\add\\add1\\\"");
  2.  
Apr 4 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Will Seay | last post by:
At the end of this message I've pasted a script we're trying to modify slightly. I don't believe it is VBscript or javascript but these are the closest groups I could find with my limited...
12
by: Moosebumps | last post by:
So, after reading some messages about os.system, and looking at the popen stuff and trying it a bit, I still have not found a way to keep a command window open for several commands (on Windows...
5
by: Mike | last post by:
Hi I am new to programming and was wondering if there was a website that has a list of commands and what they do. I want to write a program that will download certain types of files off the web...
3
by: Michael | last post by:
I am currently doing some genetic research on the life cycle of viruses (biological as opposed to computer based) and require some information about the core operations of the C programming...
0
by: Wilfred Nilsen | last post by:
We have developed some Python scripts that are similar in functionality to common UNIX commands for working with files. The commands operate directly with one or several web-servers. We are new...
3
by: KJ | last post by:
Would anyone have a list of printer commands to use within printf for a deskjet printer in C. I have worked out that bold is \x1B\x28\x73\x33\x42 but i would like to have a list to perform other...
28
by: Tim_Mac | last post by:
hi, i'm new to .net 2.0, and am just starting to get to grips with the gridview. my page has autoEventWireUp set to true, which i gather is supposed to figure out which handlers to invoke when...
0
by: sqltree | last post by:
Hi I would like to introduce www.sqltree.com website to our group members. This is exclusively for SQL beginners, students & learners. It has huge collection of frequently used SQL Commands in a...
1
by: Johny Begood | last post by:
Hi All, Anyone any suggestions on sending AT modem commands to a mobile phone connected via Bluetooth, primarly to send SMS. How would you get php to send these commands AT OK AT+CMGF=1 OK
0
by: rhyspatto | last post by:
Hi, I have a problem but cannot figure out a good solution to it. I am trying to create a form that creates a bunch of panels during runtime, and I want to be able to send commands (such as false...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.