O
O
obormotikdenis2015-06-03 08:09:27
Windows Server
obormotikdenis, 2015-06-03 08:09:27

Those. Ivanov copies (creates) the file \\comp\share\file.txt and then \\comp\share\Ivanov\ is magically created and file.txt is transferred to it?

Those. Ivanov copies (creates) the file \\comp\share\file.txt and then \\comp\share\Ivanov\ is magically created and file.txt is transferred to it, how to set it up on a network drive?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
E
Eugene, 2015-06-03
@yellowmew

I feel light déjà vu
How to automatically copy/move files? - look at my answer.
On the file server on the shared folder, we enable similar monitoring (the link to the monitoring script is in the answer),
then instead of the code that I gave, we use this:

$newfile=Get-Item ($folder+"\/"+$name)
$fileOwner=((Get-Acl $newfile).owner -replace "^.*\\")
$OwnerFolder=($folder+"\/"+$fileOwner)
if (-Not (Test-Path $OwnerFolder)) 
       {
New-Item -Type directory -Path $OwnerFolder
#Set-Acl устанавливаем нужные acl  для папки
       }
Move-Item $newfile -Destination $OwnerFolder
#Set-Acl устанавливаем нужные права на файл в случае необходимости

V
Vitaly Pukhov, 2015-06-03
@Neuroware

Wave your magic wand and say e7e420fcf28f4f927b2be31d91d8909b.png
And if, in fact, you need to clarify why it was needed at all.
Alternatively, all events in the file system are logged and you can set an action for each of them, including copying to another location. But this is a low-performance crutch. To give a more sensible solution, you need to understand why this is needed.

A
Alexander, 2015-06-03
@NeiroNx

By standard means - in any way. Unless you can script through all the files once a minute and scatter them into folders.

P
Puma Thailand, 2015-06-03
@opium

It's an idiotic situation to give users access to folders by name
, that is, just here \\comp\share\Ivanov\
and let them create it right away

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question