And it will work in python as well:
import sys, os, shutil, subprocess, time
curdir = os.path.dirname(__file__)
target = os.path.join(curdir, 'test_subject.txt')
target2 = os.path.join(curdir, 'test_subject.txt:attr1')
shutil.copy2('c:/windows/explorer.exe', target)
os.system('dir /r')
time.sleep(3)
shutil.copy2('c:/windows/win.ini', target2)
os.system('dir /r')
time.sleep(3)
On Thursday, May 10, 2018 at 12:33:11 PM UTC-7, Joss13 wrote:
>
> Some more examples here:
> http://www.flexhex.com/docs/articles/alternate-streams.phtml
>
>
> On Thursday, May 10, 2018 at 12:31:27 PM UTC-7, Joss13 wrote:
>>
>>
>>
>> On Thursday, May 3, 2018 at 3:26:33 PM UTC-7, Marcus Ottosson wrote:
>>>
>>> Basically you can write anything to your
>>> “c:/project/mayascene.mb:trololo”, “:attr1”, “:whatever” even with the
>>> shell commands, or your file manager.
>>>
>>> Sounds interesting! Would you be able to post an example?
>>>
>> Simple windows cmd script, create empty directory somewhere and run it:
>> ---
>> @echo off
>> copy c:\windows\explorer.exe test_subject.txt
>> dir /r
>> pause
>>
>>
>> type c:\windows\win.ini > test_subject.txt:attr1
>> dir /r
>> pause
>>
>>
>> more < test_subject.txt:attr1
>>
>> At the end you will have a single 'test_subject.txt' file with the
>> contents of explorer.exe in the main stream and 'win.ini' attached as
>> 'test_subject.txt:attr1
>>
>>
>> ---
>>
>>
>>>
>>>
>>
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/python_inside_maya/e12146e2-56f1-423f-9bc8-d6fd85940139%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.