Link to home
Start Free TrialLog in
Avatar of M Zahid
M ZahidFlag for United Arab Emirates

asked on

how to create Batch File?

i want to create the Batch File to copy one file to another location & can i have complete list of  e.g /e /f /k or how to get this in cmd?

Thx..
Avatar of HainKurt
HainKurt
Flag of Canada image

open notepad

put the command and save as bat file (change extension to bat)

then you can run it...

I dont get what you mean by

can i have complete list of  e.g /e /f /k or how to get this in cmd
Avatar of Mal Osborne
Most straightforward way is to just use Notepad, and save the file with a .CMD extension. Double click to run it.
Avatar of M Zahid

ASKER

thx Kurt, but i need to know how put path in the file copy from here & post there?

& i menat was C:\dir /s to get the file & path details in the but i want to make txt file of this then who can i do this?
& how to get the complete list in the cmd?

& thx Mal
dir C:\ /s > directory.txt

Will create a text file listing all files on C: including those in subdirectories.

Is that what you are trying to do?
Avatar of M Zahid

ASKER

yes Mal thx but i want to see the only the path or make txt file for path only?
I dont get what you are asking here, sorry

but i need to know how put path in the file copy from here & post there?

& i menat was C:\dir /s to get the file & path details in the but i want to make txt file of this then who can i do this?
& how to get the complete list in the cmd?

what is "/e /f /k"? which command are you referring?
what actually want as end result?
Avatar of M Zahid

ASKER

& there is command key to get the whole list of e.g /e /f /k isn't?
dir C:\ /s /ad > directory.txt What you need?
ASKER CERTIFIED SOLUTION
Avatar of Sajid Shaik M
Sajid Shaik M
Flag of Saudi Arabia 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
Avatar of Bill Prew
Bill Prew

You can also view the Microsoft help for the XCOPY command online at:



»bp
Avatar of M Zahid

ASKER

YES SAJID THAT IS WHAT I WAS LOOKING FOR, THANK YOU VERY MUCH.

WILL GET BACK YOU IF I HAVE ANY PROB WITH THE ABOVE CODE GIVEN.

THX

M ZHAID
Avatar of M Zahid

ASKER

Thank Sajid
great to hear that it's solved,  

thanks