[wish] Total Commander batch files

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
white
Power Member
Power Member
Posts: 4626
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

[wish] Total Commander batch files

Post by *white »

Total Commander can work with so called download lists. These lists can be used by selecting the menu option Net/"FTP Download From List".

Maybe in the beginning these lists only were lists of files to download, but nowadays these lists have evolved to be lists of commands to execute. To call them download lists is no longer suitable.

Available commands in 'download lists':

Code: Select all

COMMANDS

firewall       (select firewall)
mode           (set transfer mode)
ftp            (ftp download a file)
ftps           (ftps download a file)
put            (ftp upload a file)

header         (define http header attributes, example: referer)
http           (http download a file)

copyflags      (set copy options)
copy           (copy a file or directory)
move           (move a file or directory)
A group of commands to be executed sequentially is normally called a batch. So my suggestion for a new name for the download lists is to call them Total Commander batch files.

The Total Commander batch files could have extension ".tcb" and this extension could be associated with Total Commander. That way the Total Commander batch files can be executed simply by executing them (using the Enter key or by double clicking) instead of having to select a menu option.

Edited: Changed the title: "[wish TC6.03a] Total Commander batch files" -> "[wish] Total Commander batch files"

Edited: Updated the list of commands

Edited: Added below, more information about the commands

More about the mode command:

Code: Select all

Command:       mode

Description:   Transfer mode, determines the upload and download mode for files

Usage:         mode:<transfer mode>

               mode:X   (automatic mode)
               mode:I   (binary mode)
               mode:A   (text mode)

               Use capital A,I, or X!
               No spaces allowed!

Example:       mode:I
               ftp://ftp.example.com/file.exe
               mode:A
               ftp://ftp.example.com/file.txt
More about the copyflags command:

Code: Select all

Command:       copyflags

Description:   Set options for copying/moving

Usage:         copyflags:<flags number>

               copyflags:0 disables all options.
               To enable an option add the corresponding number to the flags number.

               Disable dialog before deleting "protected" source files (when moving to different drive):
               1           Delete all read only files 
               2           Delete all hidden/system files

               Disable dialog before overwriting files (pick one):
               4           Overwrite all
               8           Skip all
               16          Overwrite all older
               256         Auto-rename copy of source file
               512         Auto-rename existing target files
               1024        Overwrite all older and with the same date/time
               2048        Copy all larger files (overwrite smaller)
               4096        Copy all smaller files (overwrite larger)

               Disable dialog before overwriting files read only/hidden/system files:
               32          Overwrite all read only files
               64          Overwrite all hidden/system files

               Disable dialog when destination file name is longer than 259 characters:
               8192        copy all with name length >259
               16384       skip all with name length >259

               Disable dialog in case of I/O errors:
               128         Skip all which cannot be opened for reading
               65536       Skip all on read error
               131072      Skip all on write error

               Other options:
               262144      Copy/delete all as Administrator if access is denied
               1048576     Copy NTFS permissions
               67108864    Verify after copy
               134217728   Ignore CRC errors in verify after copy (make sure you have log file enabled)

               Spaces allowed!

Example:       Create a backup of the windows directory, overwriting all older files,
               no confirmation before overwriting Read only/Hidden/System files

               copyflags:112
               copy:c:\windows -> i:\windows
Edited: Updated copyflags information
Last edited by white on 2013-09-29, 22:47 UTC, edited 11 times in total.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: [wish TC6.03a] Total Commander batch files

Post by *Sheepdog »

white wrote:The Total Commander batch files could have extension ".tcb" and this extension could be associated with Total Commander.
I think it's desireable that one can start TC with command- parameters. Thus one could use the MUT with saved configuration, synchronise FTP servers etc.

This way I would extend this request.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Thany
Senior Member
Senior Member
Posts: 292
Joined: 2003-09-30, 09:20 UTC
Location: Netherlands

Post by *Thany »

I'd prefer scripting (VBScript or JScript is easy to implement, it already exists in Windows), since scripting is a lot more powerful than batch files.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Thany wrote:I'd prefer scripting (VBScript or JScript is easy to implement, it already exists in Windows), since scripting is a lot more powerful than batch files.
I usually deactivate scripting for security reasons. Otherwise I think that batch processing in TC would be appropriate to solve the 'file manager problems' and the greater strength of srcipting is not neccessarily.
In my opinion.


sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
Post Reply