-CopyStreams=0 is ignored
Moderators: Hacker, petermad, Stefan2, white
-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
-CopyStreams=0 is ignored
ADS are copied with file even if CopyStreams=0 is specified.
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
If you use the default copy method (CopyFileEx) or the Explorer method, the ADS are copied by Windows, not TC. There is no way to prevent this from happening.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
I have not specified niether ExplorerForCopy nor CopyStreams because their default values were 0. Now I have specified them explicitly and have performed one more test.
"type" command does not support reading stream data, therefore I use "cat" from CoreUtils for Windows.
Now I copy "test" to "test_copied" using Shift+F5.
It seems, bug exists.
Code: Select all
>type wincmd.ini | findstr UseIni
UseIniInProgramDir=7
>type wincmd.ini | findstr Explorer
ExplorerForCopy =0
>type wincmd.ini | findstr Streams
CopyStreams=0
>echo stream_data > test:stream
>type test:stream
The filename, directory name, or volume label syntax is incorrect.
Code: Select all
>cat test:stream
stream_data
>totalcmd
Code: Select all
>cat test_copied:stream
stream_data
AndrewCreator,
Standard copy method is enabled via option 'Use standard copy method (recommended)' under Copy/Delete tab of TC configuration dialog (and it corresponds to CopyDefaultMethod=1).
Explorer method is enabled via option 'Use copy+paste via Explorer (only in case of copy problems)' (and corresponds to combination CopyDefaultMethod=0, ExplorerForCopy=1).
As far as I understand, you have to use old methods 'Use default method only (reliable, not very fast)' or 'Also use big file copy mode (not using cache)' in order to be able to ignore ADS because in other modes TC just asks OS or Explorer to perform copy.
And I think such detail should be mentioned in description of CopyStreams option.
Standard copy method is enabled via option 'Use standard copy method (recommended)' under Copy/Delete tab of TC configuration dialog (and it corresponds to CopyDefaultMethod=1).
Explorer method is enabled via option 'Use copy+paste via Explorer (only in case of copy problems)' (and corresponds to combination CopyDefaultMethod=0, ExplorerForCopy=1).
As far as I understand, you have to use old methods 'Use default method only (reliable, not very fast)' or 'Also use big file copy mode (not using cache)' in order to be able to ignore ADS because in other modes TC just asks OS or Explorer to perform copy.
And I think such detail should be mentioned in description of CopyStreams option.
-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
2MVV, tahnk you for your answer. After some tests I was able to copy file without stream.
2ghisler(Author), could you check the issue? Streams are not copied if both
CopyDefaultMethod=0
and
CopyStreams=0
are specified. If I comment CopyStreams option, streams are copied insite of default value is 0.
It seems CopyStreams default value has no effect, it should be specified explicitly.
2ghisler(Author), could you check the issue? Streams are not copied if both
CopyDefaultMethod=0
and
CopyStreams=0
are specified. If I comment CopyStreams option, streams are copied insite of default value is 0.
It seems CopyStreams default value has no effect, it should be specified explicitly.
-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
2MVV, no, I have no such param.
I have performed a bit more research and I am wondered. Below is the summary (unfortunately, forum does not support BBCode tables, so I am putting it in plain text).
Configuration section is clean as much as possible (at most 4 params are specified), wincmd.ini file is read-only.
And here are the results:
Code: Select all
>type wincmd.ini | findstr /I copy
AlwaysCopyInBackground=1
CopyDefaultMethod=0
CopyDirTimeStamp=1
CopyLinks=2
CopyStreams=0
LongNameCopy=2
ShowCopyOptions=1
Configuration section is clean as much as possible (at most 4 params are specified), wincmd.ini file is read-only.
Code: Select all
[Configuration]
;CopyDefaultMethod=
;CopyStreams=
;ExplorerForCopy=
UseIniInProgramDir=7
[FileSystemPlugins]
...
Code: Select all
CopyDefaultMethod CopyStreams ExplorerForCopy Are streams copied using Shift+F5?
Commented Commented Commented Y
Commented 0 Commented Y
1 0 Commented Y (should be specified in help)
0 Commented Commented Y (unexpected)
0 0 Commented N
0 0 0 N
0 0 1 N (might be unexpected)
Last edited by AndrewCreator on 2014-03-09, 08:07 UTC, edited 1 time in total.
By default CopyDefaultMethod=1, so when it is set to 1 or commented, streams should be copied. However it is interesting why streams weren't copied in case of explorer (copy+paste) method.
Here list of INI parameters when I change modes via TC configuration dialog:
Here list of INI parameters when I change modes via TC configuration dialog:
I haven't check if streams are copied in each mode though.; standard
ExplorerForCopy=0
; default
ExplorerForCopy=0
CopyDefaultMethod=0
; big file copy mode
ExplorerForCopy=0
CopyHugeBlockSize=10240
CopyHugeBlockSizeOther=64
CopyDefaultMethod=0
; explorer after default
ExplorerForCopy=1
CopyDefaultMethod=0
; explorer after big file copy mode
ExplorerForCopy=1
CopyHugeBlockSize=10240
CopyHugeBlockSizeOther=64
CopyDefaultMethod=0
-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
I just tested different modes with CopyStreams=0 and stream was copied in explorer mode.
With CopyStreams=0 only default and big file copy methods have ignored streams, and it is expected.
However stream was copied in all modes w/o CopyStreams set so it seems that default value for this parameter is CopyStreams=1 (while help says the opposite).
With CopyStreams=0 only default and big file copy methods have ignored streams, and it is expected.
However stream was copied in all modes w/o CopyStreams set so it seems that default value for this parameter is CopyStreams=1 (while help says the opposite).

-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
AndrewCreator,
I posted above values that TC sets in different modes, so you can compare them. Anyway, I think that changing INI settings is a way to find errors where they shouldn't occur, just because you can change something in wrong way than TC expects. So configuration dialog is the preferred way to switch modes. Also, you should note that you have to restart TC after editing INI directly.
ghisler(Author),
I think you should add a note in help that it is impossible to ignore streams in standard and explorer modes. Also there is a one thing that I don't understand, I posted it above: help says that CopyStreams=0 is default value but TC copies streams in all modes when CopyStreams is not set so it seems that default value is CopyStreams=1. Who is right, TC or help file?
I posted above values that TC sets in different modes, so you can compare them. Anyway, I think that changing INI settings is a way to find errors where they shouldn't occur, just because you can change something in wrong way than TC expects. So configuration dialog is the preferred way to switch modes. Also, you should note that you have to restart TC after editing INI directly.
ghisler(Author),
I think you should add a note in help that it is impossible to ignore streams in standard and explorer modes. Also there is a one thing that I don't understand, I posted it above: help says that CopyStreams=0 is default value but TC copies streams in all modes when CopyStreams is not set so it seems that default value is CopyStreams=1. Who is right, TC or help file?
-
- Member
- Posts: 122
- Joined: 2011-10-10, 23:25 UTC
2ghisler(Author)
I have checked for version 9.0.
The following wincmd.ini causes stream to be copied.
I think CopyStreams default value is 1, not 0. Is this a bug in help file or in TC?
I have checked for version 9.0.
The following wincmd.ini causes stream to be copied.
Code: Select all
[Configuration]
CopyDefaultMethod=0
;CopyStreams=
ExplorerForCopy=0
UseIniInProgramDir=7
- ghisler(Author)
- Site Admin
- Posts: 50550
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Yes, CopyStreams=1 is indeed the default. I will update the help. Thanks for your report.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com