Documentation Help file revision - Copying hidden DESCRIPT.ION files

rps

Jul 6, 2008
436
6
Since the only way to copy a descript.ion file is to remove the hidden attribute I think the help for COPY needs a revision.

The following can be found below the /Z explanation of the Advanced Features for COPY.

Use caution with /A:, /H, or /K when both the source and destination directories contain file descriptions. If the source file specification matches the description file name (normally DESCRIPT.ION), and you use a switch which tells COPY to process hidden files,
the DESCRIPT.ION file itself will be copied, overwriting any existing file descriptions in the destination directory. For example, if the \DATA directory contains file descriptions this command would overwrite any existing descriptions in the \SAVE directory:


[c:\data] copy /h d* \save\

I would recommend this whole caution be deleted since /A: /H /K do not allow copy to work on a hidden DESCRIPT.ION file.
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Sorry, you are wrong. I just tested that when copying or moving hidden files is enabled it is possible for the hidden file DESCRIPT.ION from the source directory to replace the DESCRIPT.ION file in the destination directory. I had difficulty testing because my COPY and DIR commands are already aliased to include the safety option /[!descript.ion].
 

rps

Jul 6, 2008
436
6
You don't even need the /H; it's implied by /A:. (And /K is irrelevant; it just tells COPY to duplicate the read-only attribute on the destination file.)

Doesn't work on my system. See below.

Thu Apr 4, 2013 10:47:07
C:\testdir1>*dir

Volume in drive C is OS Serial number is aec2:b70c
Directory of C:\testdir1\*

4/04/2013 10:47 <DIR> .
4/04/2013 10:47 <DIR> ..
0 bytes in 0 files and 2 dirs
615,737,200,640 bytes free

Thu Apr 4, 2013 10:47:16
C:\testdir1>*copy /a: c:\jpsoft\tcmd13\descript.ion
0 files copied

Thu Apr 4, 2013 10:48:41
C:\testdir1>*copy /h /a: c:\jpsoft\tcmd13\descript.ion
0 files copied

Thu Apr 4, 2013 10:48:51
C:\testdir1>*copy /z /h /a: c:\jpsoft\tcmd13\descript.ion
0 files copied

The /h does work with other hidden files just not with a hidden descript.ion.

from Steve Fabian:
"I just tested that when copying or moving hidden files is enabled ...."

How do I enable copying or moving hidden files, specifically descript.ion?

Where is this setting documented? I haven't been able to find it.
 
Jan 19, 2011
604
14
Norman, OK
Just a thought... are you sure the "c:\jpsoft\tcmd13\descript.ion" file exists?
 
Aug 7, 2009
50
0
This has bothered me for quite some time. I get the same result as rps ("0 files copied") and, like rps, I would very much like to know how to overcome this, so that I am able to copy descript.ion files (in my case, .description files). Can anyone help?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
The reason description files (by default: DESCRIPT.ION) are treated specially is that their content should match the files currently in a directory. To maintain synchronism of files and descriptions in each directory, by default, when a file is moved, its description is also moved from source directory to the target directory; when a file is copied, its description is also copied; the /Nn option will prevent that..

If you copy a description file to a directory which already had a description file the descriptions of files may be lost, and files not in the directory may have entries in the description file. For this reason if you move files with a TCC command it is unnecessary to do anything with the description file. Only unusual operations benefit from explicit handling of the description file.

BTW, I repeated the tests I reported above, and I found that in the latest build of TCC15 the COPY command behaves differently: a description file can be copied only if you first remove its default H(idden) attribute, regardless of the status of the SETDOS /D option. This is indeed a deviation from the documented operation of COPY.
 
Aug 7, 2009
50
0
Steve, thanks for the reply. I understand and appreciate the reasons behind the special handling. Nevertheless, there are times when it is necessary to copy the descript.ion file, and we should not be prevented from doing so (shades of MS). I'm using TCC 13.04.63 x64, and SETDOS /D does not resolve the issue. There should be a simply command-line switch for the copy command to allow this. Short of that, does anyone have any other work-around?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Short of that, does anyone have any other work-around?
In my - admittedly rudimentary - tests removing the hidden attribute allowed the description file to be copied. You could create a simple alias to 1/ unhide the source description file, 2/ copy it to the target directory, and 3/ hide the description files in both the source and target directories. Another possibility (UNTESTED!!!) is to use the SETDOS /D option to temporarily change the name of the description files (to some filename you never use) before copying, and restore it when done.
 
Aug 7, 2009
50
0
Hi Steve, I often need to copy or re-create a directory tree--and I have descriptions for the directories! Assume the destination directory tree exists, but is empty. I wish to copy just the description for the directories (i.e. copy the descript.ion files), which seems to require removing/replacing the hidden attribute, but I'm not sure how to write an alias to do that, since the destination changes for each directory in the tree.

As for changing the name of description files, then copying the former-named files (descript.ion), then changing the name back, I would like to know if anyone has tested this and found it safe?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
One of the things you can do is to copy each directory description, thus (untested!!!):
Code:
    describe target_dir /d"%@descript[source_dir]"
This can be done at the same time as creating the target directory.

These commands make all DESCRIPT.ION files of a directory tree copied (untested!!!):
Code:
attrib /s /a:h -h source_dir\DESCRIPT.ION
copy /s source_dir\DESCRIPT.ION target_dir\
attrib /s /a:-h +h source_dir\DESCRIPT.ION target_dir\DESCRIPT.ION

The method where first you use SETDOS/D to change the name used by TCC to find description files, copy everything include hidden files named DESCRIPT.ION, and restore the name by a second SETDOS/D worked in my quick test. Te only thing that could have made it fail would have been if changing the search name would have also renamed existing description files, but that does not happen.

You have three distinctly different methods above to accomplish your goal.
 

Charles Dye

Super Moderator
Staff member
May 20, 2008
4,462
88
Albuquerque, NM
prospero.unm.edu
The method where first you use SETDOS/D to change the name used by TCC to find description files, copy everything include hidden files named DESCRIPT.ION, and restore the name by a second SETDOS/D worked in my quick test.

Note that it's possible to change the description-file name to something illegal:

Code:
set olddname=%_dname
setdos /d"nul.txt"
copy ...

NUL.TXT or the like is guaranteed not to match any real filenames, and TCC doesn't complain about this bit of chicanery.
 

samintz

Scott Mintz
May 20, 2008
1,503
16
Solon, OH, USA
I don't use the descriptions so I'm in unfamiliar territory here. But couldn't you append the source DESCRIPT.ION to the destination DESCRIPT.ION file then do DESCRIBE /U to clean it up?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
Scott:
Your approach would work nicely in general (except for files or directories with different descriptions in the original and appended description files), but my understanding of the original post and its follow ups is that the destination is a new directory tree with no files, which is NOT created by TCC's COPY command. Were it created by TCC's COPY, the directory descriptions would be automatically duplicated, and no copying of descriptions or description files would be needed. This was just tested in the current TCC build.
 
Aug 7, 2009
50
0
Thanks to all you experts for your insight. I would really like to use the "change the name" method.

Well, this is interesting: TCC 13 x64 running on Windows 7 Pro 64-bit SP1; each time I try setdos /d"test.txt", Windows tells me "The program has stopped responding" and I must close it. I've never tried using setdos to change the description file name before (I have it set in tcmd.ini to ".description"). Any thoughts on why this is happening?
 
May 20, 2008
3,515
4
Elkridge, MD, USA
I just tested it with the latest TCC, 15.01.52, both 32b and 64b, same Win7, and no such issue found.Only 32b version of V13.04.63 installed on Win7, it worked faultlessly. Also tested 32b version of V13 and V15 on WinXP Professional SP3, successfully. I tried the name change both with descriptions enabled and disabled, always worked. Try "which /a setdos" to verify it is the internal command, not an alias or plug-in (or some other program). Another possibility I can think of is one of file permissions to "test.txt", but not a likely candidate - the command only changes a data field inside TCC, without actual file access. Lastly, the name you use, .description, may have properties / permissions preventing the change. Using only 32b TCC15 on Win7/64b I was able to change the name to .description and back to descript.ion. You should try to modify your .INI file using a different name, and try changing the name to various values. If all else fails, you may need to reinstall TCC13.
 
Aug 7, 2009
50
0
Steve, thanks for all your testing! It is the correct setdos command. One other factor (though I doubt it is a contributor): I had several TCC windows open at the time.

In the interim, I used your attrib /s method to copy the descriptions across from one directory tree to another, and then hide them, and it worked fine. Thanks!

In earlier versions, there was no difficulty in copying the description file. I really do think that there should be a command line switch (or setdos option) to allow this!
 
Similar threads
Thread starter Title Forum Replies Date
JohnQSmith New online help file wrong logo Support 7
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
U Command help on file names Support 5
Alpengreis Documentation Minor issue in help file for view /E Support 1
Joe Caverly DIRectory Colorization in v25 Help File Support 0
Joe Caverly _EXPANSION in help file Support 0
K_Meinhard Help file error Support 1
Joe Caverly JOBMONITOR in Help File Support 1
A Documentation [Help file] OPTION "//" synopsis formatting issue Support 0
Joe Caverly v24 Help File - DATEMONITOR Support 1
Joe Caverly SAVECONSOLE in Help File Support 0
Joe Caverly Documentation SETP correction in help file Support 0
Joe Caverly TCC-RT Help File (PIPEVIEW) Support 4
TT's Help! Uninstalling TCC did not restore cmd.exe as Win10 default batch file processor. Support 4
fishman@panix.com Help FILE problem... Support 3
vefatica Multiple instances of help file Support 3
dcantor Help file minor error Support 0
B Help file problem with version 16 Support 2
Joe Caverly Documentation @WINMETRICS in the Help file Support 1
S How to? Incorporate tables from HELP into batch file Support 15
fishman@panix.com Help file in Kindle format? Support 5
JohnQSmith Help file for TOUCH Support 0
Joe Caverly No Help File in 13.04.55? Support 8
jwblyth How to? Help will not Load in View (File Viewer)?? Support 4
Stefano Piccardi 13.01.31 help file Support 1
dcantor Help file errors Support 0
H Help file for 13.1?? Support 20
H Help file pdf dates do not match Support 3
J Help file problem Support 0
C Add link to ewriter help to program group... Support 3
samintz How to? Search for %(command) in Help? Support 1
Joe Caverly Favorites in eWriter Help Support 6
Joe Caverly Quick Search in eWriter Help Support 1
vefatica Online help? Support 2
fishman@panix.com HELP!! I just updated to Version 28 and as usual I cannot make extended directory search work. Support 2
Jay Sage Documentation Function @DRIVE Missing in Help Lists Support 0
Charles Dye More help nits Support 0
D Documentation Typo in COPY help Support 0
Joe Caverly Documentation COMMANDS in Version 27 help Support 8
K_Meinhard How to? Help window position Support 7
D Documentation Help "Startup" page does not describe global lists Support 0
vefatica Help disappears? Support 6
rchapmanitt Help Purchasing Support 2
Charles Dye Documentation Help nits: @ZIPFILECRC Support 0
C version help Support 3
C Documentation Help Nit. REN / RENAME Support 0
Dmitry L. Kobyakov Documentation Error in the Help: the WINDOW command Support 0
vefatica Help for @PID Support 2
vefatica Need help with XML Support 3
R Documentation Advanced Directives Help Support 0

Similar threads