Forum Discussion
CMD to copy files/folder without full directory path?
I searched and found this "xcopy <source> <destination> /s /e"
where source and destination are full directory path, but is there a way to omit them so files can be copied within the same folder structure and same folder names without having to list directory path, as they may change with different drives if moved.
example of what I mean:
I have C:\workfolder\ and within it I have 3 more folders A, B and C
Folder A have many files/folders and wish to copy/paste into B and C (duplicate)
and wish to do this without listing out full source/destination path, is there cmd commandline to do this?
2 Replies
- RemyThatcherIron Contributor
If you want to copy files or folders within the same directory without specifying the full path, you can use relative paths or current directory references in CMD.
- StranharmVoteIron Contributor
Copying a file with the xcopy or robocopy command eliminates the need for the full path.