Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

copy program

- - - - -

  • Please log in to reply
3 replies to this topic

#1
b-man

b-man

    Member

  • Member
  • PipPip
  • 226 posts
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 directories

eg.

Folder 1
- Folder 2
- - File 1
- - File 2
- Folder 3
- - File 3
- - File 4


if i want to copy all i just copy Folder 1 and use "send to" very easy

if 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 files

is there something that can do "send to" (or copy) with 2 leading folders?

Edited by b-man, 19 January 2013 - 07:55 PM.



How to remove advertisement from MSFN

#2
Ponch

Ponch

    MSFN Junkie

  • Patrons
  • 3,240 posts
  • OS:none specified
  • Country: Country Flag
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.

#3
b-man

b-man

    Member

  • Member
  • PipPip
  • 226 posts
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 it

but after probably 6 hours of googling i have found out how to do it

so anyone that actually wants to know how to here it is

first you need total commander
and then download the plugin copytree
http://www.totalcmd....g/copytree.html

then 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 instructions

1. Installation and configuration file

to 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 usage

to 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 this


hope whoever wants this can get it working fine

#4
bphlpt

bphlpt

    MSFN Addict

  • Member
  • PipPipPipPipPipPipPip
  • 1,796 posts
  • OS:none specified
  • Country: Country Flag
You also might be able to use RoboCopy - http://ss64.com/nt/robocopy.html

See here for a similar example: http://stackoverflow...s-using-windows

E.g given the following directory structure:

folder1
  folder2
    folder3
      data.zip
      info.txt
      abc.xyz
    folder4
    folder5
      data.zip
      somefile.exe
      someotherfile.dll
The 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.zip


You 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 /E


Cheers and Regards

Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN