Link to home
Start Free TrialLog in
Avatar of mshox1
mshox1

asked on

simple dos command to find number of files in a directory or folder

I need to find a simple command (from dos) to find out number of files in a given directory (or path).

currently, it will display all the filename first, then at the end, it give me number of files.

thank you
ASKER CERTIFIED SOLUTION
Avatar of OrenRozen
OrenRozen
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Qlemo
Qlemo
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Bill Prew
Bill Prew

Sorry, cut and paste error, should be:

dir /a-d /b | find /v /c ""

Open in new window

~bp
Avatar of mshox1

ASKER

what is the above command will do?  
      

dir /a-d /b | find /v /c ""

Like to know more explanation of this command's variables.

thanks

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mshox1

ASKER

thank you.

I have a follow up questions:

what is the best and simple command to copy all the files/subfolder  from 1 place to the others?

xcopy c:\base_folder /s    y:\base_folder   /y /v

-- I like to copy a folder, with all its files and sub directory, to another driver,  replace the file is exist,
  if folder not exist, will create it,  if folder exist, will replace it,  and then verify if copy complete.

thanks

Sorry, but that is no follow up question, because it isn't related. EE protocol says you need to post a new question for that.
Avatar of mshox1

ASKER

thanks a lot