Zodler
December 21, 2015, 12:35pm
1
I would like a command to copy/move selected files to destination with their parent folders intact. Thanks.
I have done a search and seen commands like this
Copy CREATEFOLDER {sourcepath|nopath|noterm}
But this is not what I want. It only creates the parent folder. I want all the parent folders up to the root created.
For example if I select this file.txt
M:\F1
------\F21
------\F22
-----------\F31
-----------\F32
----------------\file.txt
------\F23
and run the command with the destination D:\Folder, I should get
D:\Folder
----------\F1
-------------\F22
-----------------\F32
---------------------\file.txt
Leo
December 21, 2015, 1:19pm
2
nopath gets you just the name at the end of a path, without the other components before it, so you don't want that.
noroot is what you want. It just removes the drive letter from the start of a path and keeps the rest.
Zodler
December 21, 2015, 2:26pm
4
One issue I have. How can I make it to copy the hidden system files desktop.ini too? I have set icons for my folders and I lose them if I copy this way.
Leo
December 21, 2015, 3:22pm
5
The CREATEFOLDER argument just creates folders and adjusts the destination to which selected files & folders & their contents are copied.
You would need to write a script if you want it to walk up the tree of parent folders and copy additional files out of them.