Copy files with directory structure?

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
salocorgan69
Junior Member
Junior Member
Posts: 13
Joined: 2006-03-01, 15:46 UTC

Copy files with directory structure?

Post by *salocorgan69 »

Hi all.

If I do a selective search (alt-f7) for files, and get a result list, I'd like to then copy those files to a destination (and here's the tricky bit) while including their directory structure (but of course not any files in the same directories that didn't match my search criteria).

Is this possible?

Thanks!

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Try to use packer plugin TreeCopy. You will need to select files, press Alt+F5, select TreeCopy and click OK. It will copy files (not pack) keeping structure.

User avatar
Hacker
Moderator
Moderator
Posts: 11683
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

MVV wrote:Try to use packer plugin TreeCopy.
Never tried, but IIRC TreeCopyPlus should be better.

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom »

I use this
Button: wrote:Command: %ProgramFiles%\AutoHotkey\AutoHotkey.exe "%ProgramFiles%\AutoHotkey\Scripts\TC_ClipCopySelectedPreservePath.ahk"
Parameters: "%T"

Code: Select all

trgPath=%1%
PostMessage, 0x433, 2018, 0x0,, A
ClipWait
Loop, Parse, ClipBoard, `r`n
{
	SplitPath, A_LoopField, aFile, aDir
	if( SubStr(aDir,2,2) == ":" )
	{
		FileCreateDir, % trgPath SubStr(aDir, 4)
		FileCopy, %A_LoopField%, % trgPath SubStr(aDir, 4)
	}
}
Or this
Button: wrote:Command: %ProgramFiles%\AutoHotkey\AutoHotkey.exe "%ProgramFiles%\AutoHotkey\Scripts\TC_CopySelectedPreservePath.ahk"
Parameters: "%T" "%L"

Code: Select all

trgPath=%1%
Loop, Read, %2%
{
	SplitPath, A_LoopReadLine, aFile, aDir
	if( SubStr(aDir,2,2) == ":" )
	{
		FileCreateDir, % trgPath SubStr(aDir, 4)
		FileCopy, %A_LoopReadLine%, % trgPath SubStr(aDir, 4)
	}
}

User avatar
MVV
Power Member
Power Member
Posts: 8486
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Hacker wrote:
MVV wrote:Try to use packer plugin TreeCopy.
Never tried, but IIRC TreeCopyPlus should be better.
Me too, but I think you're right. :) I forgot exact plugin's name.

TreeCopyPlus

User avatar
nsp
Power Member
Power Member
Posts: 1264
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: Copy files with directory structure?

Post by *nsp »

salocorgan69 wrote:Hi all.

If I do a selective search (alt-f7) for files, and get a result list, I'd like to then copy those files to a destination (and here's the tricky bit) while including their directory structure (but of course not any files in the same directories that didn't match my search criteria).
Is this possible?

Thanks!
You can use TCBL to process all files and xcopy to create and copy file at once.
sample if you want to create a copy from disk C: to drive Z:
Select file to copy (even from feed to listbox panel) an click on button or hotkey ...

Code: Select all

program: <path to>\tcbl.exe
parameters: %L @xcopy /I $f Z:$p!
-- limitations do not support Unicode names, do not work with file inside archive

salocorgan69
Junior Member
Junior Member
Posts: 13
Joined: 2006-03-01, 15:46 UTC

Post by *salocorgan69 »

Thanks everyone - totalcopyplus does the trick nicely.

Would be great to have this within the app natively.

User avatar
Hacker
Moderator
Moderator
Posts: 11683
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

salocorgan69,
totalcopyplus does the trick nicely
What's that?

Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.

Post Reply