Command Line (edit)

Tham khảo:

Command to list all files in a folder as well as sub-folders in windows

The below post gives the solution for your scenario.

dir /s /b /o:gn

/S Displays files in specified directory and all subdirectories.

/B Uses bare format (no heading information or summary).

/O List by files in sorted order.

Then in :gn, g sorts by folders and then files, and n puts those files in alphabetical order.

Copy file to file

copy /y "PATH_TO_FILE" "D:\BACKUP\ONGAME-360\FILE_NAME"

xCopy folder to folder

xcopy /s "C:\inetpub\wwwroot\Sites\Site1\*.*" "D:\Sites\Site1\"

xCopy folder structure

xcopy C:\Your Folder C:\New Folder /t /e

http://techbrij.com/notes/windows-run-commands.php

Lấy danh sách thư mục (folder) và thư mục con (sub-folder)

dir /s /b /o:n /ad > folders.txt
dir /s /b /o:gn > files.txt