- Aug
- 2,870
- 153
Further to my suggestion "Add a .tccignore File for Automatic File Exclusion"
This is a work-in-progress,
not yet ready for prime-time.
That is,
its purpose is for testing only.
I'm using the DIR command for testing,
after which I will start testing with COPY.
I have created a library command;
I have created an alias;
If the folder in which I run the dir command has a file called .tccignore
the files contained in the .tccignore file will be ignored by the dir command.
In the R:\ folder,
and the .tccignore file exists,
but I want to do dir u:\ from the r:\ folder,
the idir command will ignore the .tccignore file.
The idir command will resolve a directory alias to a folder.
Things to remember...
I have to use an in-process pipe instead of a normal pipe.
Not a deal breaker in regards to the pipe,
I can live with that.
Joe
I would like to suggest adding support for a
The purpose of
directory-specific file-exclusion patterns for commands such as
TCC already supports file-exclusion ranges.
The documentation states that most internal commands that accept wildcards also accept file-exclusion ranges,
using syntax such as:
For example:
.tccignore file in TCC.The purpose of
.tccignore would be to provide persistent,directory-specific file-exclusion patterns for commands such as
COPY, MOVE, and RENAME, without requiring the exclusion range to be specified every time.TCC already supports file-exclusion ranges.
The documentation states that most internal commands that accept wildcards also accept file-exclusion ranges,
using syntax such as:
Code:
/[!pattern1 pattern2]
For example:
Code:
COPY /s /[!*.bak *.bmark *.org transcript.md] *.*...
- Joe Caverly
- Replies: 2
- Forum: Suggestions
This is a work-in-progress,
not yet ready for prime-time.
That is,
its purpose is for testing only.
I'm using the DIR command for testing,
after which I will start testing with COPY.
I have created a library command;
Code:
idir {
@SETLOCAL
@ECHO OFF
rem which dir
rem dir is an alias : utils.library$idir
rem .tccignore
rem *.bak
rem *.txt
if isdir r:\temp set temp=r:\temp
set ArgC=%#
set TCCIgnoreFlag=N
do kount=1 to %ArgC
set ArgV=%[%kount]
iff isdir %ArgV then
if isalias %ArgV set %ArgV=%@alias[%ArgV]
echo Folder: %ArgV
iff %@index[%_cwd,%ArgV] eq -1 then
echo Do not honour .tccignore
set TCCIgnoreFlag=Y
endiff
rem Now that we know where the files are from...
leave
endiff
enddo
rem pause
iff exist .tccignore .and. %TCCIgnoreFlag eq N then
do theFile in @.tccignore
set Ignore=%Ignore %theFile;
enddo
echo Ignoring %Ignore
internal dir /[!%Ignore] %$
else
internal dir %$
endiff
ENDLOCAL
}
I have created an alias;
Code:
dir=utils.library$idir
If the folder in which I run the dir command has a file called .tccignore
the files contained in the .tccignore file will be ignored by the dir command.
In the R:\ folder,
and the .tccignore file exists,
but I want to do dir u:\ from the r:\ folder,
the idir command will ignore the .tccignore file.
The idir command will resolve a directory alias to a folder.
Things to remember...
I have to use an in-process pipe instead of a normal pipe.
Code:
R:\>dir u:\ | view
TCC: Unknown command "utils.library$idir"
R:\>dir u:\ |! view
Not a deal breaker in regards to the pipe,
I can live with that.
Joe
Last edited: