b-man Posted January 20, 2013 Share Posted January 20, 2013 (edited) i do alot of copying single files to my usb stick and every time i copy it i have to type the 2 parent directory folders to the copy the file to is there a copy program that can copy the file with (2) amount of parent directorieseg.Folder 1- Folder 2- - File 1- - File 2- Folder 3- - File 3- - File 4if i want to copy all i just copy Folder 1 and use "send to" very easyif i only want to copy file 1 i need to create Folder 1 and then create folder 2 inside folder 1, i then copy file 1 into the created directories(now why dont i just copy all and then delete file 2? and folder 3) because theres normally alot more folders and filesis there something that can do "send to" (or copy) with 2 leading folders? Edited January 20, 2013 by b-man Link to comment Share on other sites More sharing options...
Ponch Posted January 24, 2013 Share Posted January 24, 2013 This doesn't answer your last question as such but you could create a simple batch fie that does "xcopy /t" from your base folder to the target, so it would do half the work for you (create the directories).Creates directory structure, but does not copy files. Does not include empty directories or subdirectories. /T /E includes empty directories and subdirectories. Link to comment Share on other sites More sharing options...
b-man Posted January 24, 2013 Author Share Posted January 24, 2013 thanks, yeah i knew xcopy could do that but its still alot of manual effort i could do it by hand quicker as each time i want to do it its something different so by the time i done it in cmd i could of already done itbut after probably 6 hours of googling i have found out how to do itso anyone that actually wants to know how to here it isfirst you need total commander and then download the plugin copytreehttp://www.totalcmd.net/plugring/copytree.htmlthen heres a snippet from the readme (comes with the file but a little hard to understand (although could be fro lack of sleep) an i will just edit the install instructions1. Installation and configuration fileto install it manually you should extract archive contents to any folder (i created a folder called plugin in the Total commander install Dir, then created a folder called CopyTree where i extracted the file), load Total commander and open Configuration - Plugins - Configure packer plugins, choose an extension for plugin It is recommended to use extension CopyTree (it will be displayed in the Pack dialog's list of packer plugins). and then specify path to plugin file.(where you extracted it before)Total Commander passes INI file name on plugin loading. If not (e.g. TC version earlier than 5.51) or if INI with plugin's name exists near the plugin, this file will be used as configuration file. File encoding may be ANSI or Unicode - you may change it manually using any text editor.Parameters in [Copy Tree] section: AskOptionsOnWin=1 Show choose tree level dialog before copying if Win key is down; AskOptionsAlways=0 Show choose tree level dialog before every copying; CopyDirTimeStamp=0 Copy timestamps of directories; DefaultCopyLevel=0 Allows to override folder levels to copy. If >0, specifies number of levels to copy (1 - first safe choice, 2 - first safe plus one level etc.), if <0 - number of levels from root folder to skip (-1 - full path with drive letter, -2 - full path w/o drive letter etc.). When choose levels dialog is shown, overrides initial choice. If this parameter is set, it disables mandatory displaying of choose levels dialog when you copy files from search results panel; Language Current language file name (just name w/o path and extension).2. General features and usageto use select the files your after and press Alt+ F5, then select copytree and done (make sure your right window in TC is the location you want the Destination directory to be)the readme explains everything but just not as direct as thishope whoever wants this can get it working fine Link to comment Share on other sites More sharing options...
bphlpt Posted January 25, 2013 Share Posted January 25, 2013 You also might be able to use RoboCopy - http://ss64.com/nt/robocopy.htmlSee here for a similar example: http://stackoverflow.com/questions/472692/how-to-copy-a-directory-structure-but-only-include-certain-files-using-windowsE.g given the following directory structure:folder1 folder2 folder3 data.zip info.txt abc.xyz folder4 folder5 data.zip somefile.exe someotherfile.dllThe files data.zip and info.txt can appear everywhere in the directory structure. How can I copy the full directory structure, but only include files named data.zip and info.txt (all other files should be ignored)?The resulting directory structure should look like this:copy_of_folder1 folder2 folder3 data.zip info.txt folder4 folder5 data.zipYou don't mention if it has to be batch only, but if you can use ROBOCOPY, try this:ROBOCOPY C:\Source C:\Destination data.zip info.txt /ECheers and Regards Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now