Jump to content

Understanding the CMD prompts

Good evening at the time that I am writing this I am following through a VM Lab for the A+ cert course in my home town I am familiar w/ most things computer but have neglected the programing aspect of PC. the problem I am facing at this time is understanding why things are being added that are not in the directory (the "help" sheet that pops up when your in the cmd window). Anyways i understand some of it like /s /h are for showing the hidden files, etc; 

 

xcopy c:\drivename\* l:\data\ /s /e /y . 

 

the line above is the one I am trying to understand better I comprehend that I wont become knowledgeable of this type of system overnight but i believe that reaching out to this community would be helpful in getting me there i understand that it copies data/files/etc to a folder and saves it in the "l" drive in this case, i simply dont understand where the system pulled the /s /e /y from or what they stand for individually when being used under other commands anyways please let me know if you have seen this before or know/understand the concept behind this stuff I am just trying to get knowledgable.

Link to comment
Share on other sites

Link to post
Share on other sites

These are all switches that can be used with the xcopy command. 

 

/s = Copies folders and subfolders except empty ones

/e = Copies any subfolder, even if it is empty

/y = Overwrites existing files without prompting you

 

https://support.microsoft.com/en-gb/help/289483/switches-that-you-can-use-with-xcopy-and-xcopy32-commands

 

EDIT: also, the * in the command is used as a wildcard, so that command would copy everything from c:\drivename\, including all folders, subfolders, even if they're empty and will overwrite any files in the destination without a prompt. 

 

The switch /s is redundant in this command though, as /e does everything /s does, but also copies empty subfolders. 

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, Samfisher said:

I have seen this in my search for answers haha, while i appreciate it i dont understand the why behind the coding maybe i need to rethink my question haha thank you though i will deff save it and look up more information

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, MetalSpark128 said:

I have seen this in my search for answers haha, while i appreciate it i dont understand the why behind the coding maybe i need to rethink my question haha thank you though i will deff save it and look up more information

What do you mean by why?  Each flag has a corresponding function :D

QUOTE ME IN A REPLY SO I CAN SEE THE NOTIFICATION!

When there is no danger of failure there is no pleasure in success.

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Oshino Shinobu said:

These are all switches that can be used with the xcopy command. 

 

/s = Copies folders and subfolders except empty ones

/e = Copies any subfolder, even if it is empty

/y = Overwrites existing files without prompting you

 

https://support.microsoft.com/en-gb/help/289483/switches-that-you-can-use-with-xcopy-and-xcopy32-commands

 

EDIT: also, the * in the command is used as a wildcard, so that command would copy everything from c:\drivename\, including all folders, subfolders, even if they're empty and will overwrite any files in the destination without a prompt. 

 

The switch /s is redundant in this command though, as /e does everything /s does, but also copies empty subfolders. 

thank you this explains it a bit better than the website thanks for the link

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×