MakeBAT plugin question

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

MakeBAT plugin question

Post by *sas2000 »

 
I'm trying to use Makebat plugin to create Batch files for my backups with XXCopy.

I need to be able to make lists of directories like this one.
XXCOPY "c:\Program Files\FileZill?\" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\HDDTUN?\" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\IrfanVie?\" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\KillSof?\" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\Lavasof?\" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\Mozilla Firefo?\" "D:" /PB1K /E /YY /H /K /Z
But the problem that i've found is that MakeBAT creates batch files with one line for each file of each directory and i only need one line for directory. Thanks.
 
User avatar
majkinetor !
Power Member
Power Member
Posts: 1580
Joined: 2006-01-18, 07:56 UTC
Contact:

Post by *majkinetor ! »

don't know about makebat plugin but you can create plain batch script that does that and connect it with TC via %L option. You will get list of selected directories in temporary file. AFter that you only need to prepend xxcopy to the list and your destination and parameters.


You can use

Code: Select all

for /F "tokens=*" %%i in (%1) do xxcopy "%%i" "d:" [your parameters]
Name this file backup.bat and call it from start menu with %L option as an parameter


As you can see, makebat plugin can be simulated with this one simple command. You can even create gui with user command instead of hardcoding xxcopy command by using my guibox utility:

Code: Select all

guibox edit MyMakebat "Write command.$Use %1 to insert a file name"
Habemus majkam!
User avatar
nsp
Power Member
Power Member
Posts: 1913
Joined: 2005-12-04, 08:39 UTC
Location: Lyon (FRANCE)
Contact:

Re: MakeBAT plugin question

Post by *nsp »

sas2000 wrote:
I'm trying to use Makebat plugin to create Batch files for my backups with XXCopy.

I need to be able to make lists of directories like this one.
XXCOPY "c:\Program Files\FileZill?" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\HDDTUN?" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\IrfanVie?" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\KillSof?" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\Lavasof?" "D:" /PB1K /E /YY /H /K /Z
XXCOPY "c:\Program Files\Mozilla Firefo?" "D:" /PB1K /E /YY /H /K /Z
If you do not mind using a button to create a Batch and launch it, you can use TCBL. If you want to save the batch, you have the edit option.
The TCBL command could be :

Code: Select all

Command : tcbl.exe
Parameter : -e %L xxcopy $f\ "D:" /PB1K /E /YY /H /K /Z
As makebat is distributed with source, you can even modify it to add a reurse flag or not ;)
User avatar
sas2000
Power Member
Power Member
Posts: 682
Joined: 2003-02-07, 04:32 UTC
Location: Galiza

Post by *sas2000 »

 
2majkinetor ! & 2nsp

Good ideas, thanks :!: .
 
Post Reply