Right click send to multiple drives/folders

Soldato
Joined
21 Dec 2019
Posts
7,397
Location
Planet Thanet
I move a load of data around
3 x M2 drives
3 x sata ssds
1 x external
Have multiple back ups of stuff on them
Any one know how to get a right click to send to multiple places at once?

For example
Send to D and E and F drive all at same time
I know its only couple extra clicks to do them separately but gets irritating after a while
Not looking for one of those automated backup softwares as it's on a file by file basis for example if i mount a backup image and want something off that etc

Thanks
 
Read a bit on mklink
Most examples I found explained how to do if for a specific folder buried in the operating system
Not just a simple send to drives D, E, F
Like I am looking for
So left me none the wiser after an hours reading on it lol

Got a nicer way to do this for you in PowerShell. I haven't tested it for efficiency or leakage as time is a bit short today, but this will work for you

Code:
$source = "C:\source"
$destFolders = 'C:\wherever',  '\\server1\wherever', 'E:\somewhere_else'
$destFolders | Foreach-Object { Copy-Item -Path $Source -dest (Join-Path $_ $destFileName) }
 
Got a nicer way to do this for you in PowerShell. I haven't tested it for efficiency or leakage as time is a bit short today, but this will work for you

Code:
$source = "C:\source"
$destFolders = 'C:\wherever',  '\\server1\wherever', 'E:\somewhere_else'
$destFolders | Foreach-Object { Copy-Item -Path $Source -dest (Join-Path $_ $destFileName) }
Thank you very much
I will try it once I am on pc
And let you know how I get on
 
so obviously i am not very good at this
is the idea i make a source folder drop stuff in it
and it should copy to destination folders?

heres what i tried-i assumed i would have to alter some of what you wrote to fit my circumstances
so made a source folder on drive c desktop-called sendtodrives -no spaces in name in case made it more complex
made a destination folder on e,f,g drives--all called sentfromdrives-tried 1,2,3 on end of each in case all called the same even though on different drives might be a problem
didnt work so removed 1,2,3 for now
so its
C:\Users\Administrator\Desktop\sendtodrives is source folder
E:\sentfromdrives destination folders-wasnt sure if could just use root of destination drives hence a folder
F:\sentfromdrives
G:\sentfromdrives

so tried
$source = "C:\Users\Administrator\Desktop\sendtodrives"
$destFolders = 'E:\sentfromdrives', '\\F:\sentfromdrives, 'G:\sentfromdrives'
$destFolders | Foreach-Object { Copy-Item -Path $Source -dest (Join-Path $_ $destFileName) }

i know probably made a mess of it never tried this before so thanks for your help and patience
 
You did this in powershell?

I suspect it's because the source is pointing to a folder and there's no recursive switch in the command so you'd want to tell PS what you're moving from the source. If it's all files, I suspect you'd want to add *.* at the end of the source path.

Did you get an error? If so, can you post that up
 
so obviously i am not very good at this
is the idea i make a source folder drop stuff in it
and it should copy to destination folders?

heres what i tried-i assumed i would have to alter some of what you wrote to fit my circumstances
so made a source folder on drive c desktop-called sendtodrives -no spaces in name in case made it more complex
made a destination folder on e,f,g drives--all called sentfromdrives-tried 1,2,3 on end of each in case all called the same even though on different drives might be a problem
didnt work so removed 1,2,3 for now
so its
C:\Users\Administrator\Desktop\sendtodrives is source folder
E:\sentfromdrives destination folders-wasnt sure if could just use root of destination drives hence a folder
F:\sentfromdrives
G:\sentfromdrives

so tried
$source = "C:\Users\Administrator\Desktop\sendtodrives"
$destFolders = 'E:\sentfromdrives', '\\F:\sentfromdrives, 'G:\sentfromdrives'
$destFolders | Foreach-Object { Copy-Item -Path $Source -dest (Join-Path $_ $destFileName) }

i know probably made a mess of it never tried this before so thanks for your help and patience

Ignore previous, tidied it up for you...

Code:
$source = "C:\Desktop\test\*.*"
$dest = @("E:\Receive","\\mappeddrive\IT\Receive","D:\somewhereelse\)

# Calling Copy-Item with parameters source: '$source', destination: '$dest'."
foreach ($dir in $dest)
{
    Copy-Item -Path $source -Destination $dir -PassThru
}

This will output to the console what is being copied and where (i've used passthru as opposed to verbose as it's a bit neater. It will also overwrite each time it's run (not sure if that's ideal for what you're trying to do). Lastly, it isn't really a simultaneous copy, but that's probably not a bad thing. It will copy all files from source to the first dest, then once that's complete, start again with the next dest, etc. The destination folders must exist.

You should have PowerShellISE in your start menu, run that as admin and enter that code into the script window at the top, then click on the run (play arrow) once you've changed the $source and $dest paths to suit your needs. You'll notice I added the *.* to the source, otherwise it will just copy an empty folder over.

Get that sorted, and I'll then show you how to make it a PowerShell module so you can just open PS and type in something like run-backup and it will do the rest. From that, we can even email the results as HTML or send a txt file output. Once you have a PS module, you can then create a scheduled task to run it.
 
Last edited:
Thanks once again
Yes used powershell
As admin
Gave no error message ~no message at all to indicate it was right or wrong
I tried exactly as you wrote it first obviously
As didn't work although no real idea how to use it
Changing variables that seemed relevant to my drive set up seemed the thing to try
Was almost 2am probably not best time to try lol
I made folders as wasn't sure if just for example C as a source would be ok and just E, F, G as destinations was ok
And not simultaneously is perfectly fine~the drives are all fast pci~e x4 M2 so could handle simultaneously if required but wasn't a neccessity
At least hopefully I didn't make any massive screw ups as this is way beyond my capability
So I thank you for your patience
It's really appreciated

Edit
On pc in an hour or so to try again
 
sorry took a while
got sidetracked with other stuff
clearly i am not doing it right as got lot of pink and red text
and no run/play option

i tried this===and wasnt sure about the \\mappeddrive\IT\Receive part so didnt alter that

$source = "C:\Users\Administrator\Desktop\sendtodrives*.*"
$dest = @("E:\sentfromdrives","\\mappeddrive\IT\Receive","F:\sentfromdrives\)

# Calling Copy-Item with parameters source: '$source', destination: '$dest'."
foreach ($dir in $dest)
{
Copy-Item -Path $source -Destination $dir -PassThru
}


cEsaEAa.png

thanks yet again
 
sorry took a while
got sidetracked with other stuff
clearly i am not doing it right as got lot of pink and red text
and no run/play option

i tried this===and wasnt sure about the \\mappeddrive\IT\Receive part so didnt alter that

$source = "C:\Users\Administrator\Desktop\sendtodrives*.*"
$dest = @("E:\sentfromdrives","\\mappeddrive\IT\Receive","F:\sentfromdrives\)

# Calling Copy-Item with parameters source: '$source', destination: '$dest'."
foreach ($dir in $dest)
{
Copy-Item -Path $source -Destination $dir -PassThru
}


cEsaEAa.png

thanks yet again

Sorry, probably my fault for confusing things with the \\mappeddrive. That just shows you can use UNC paths (as long as the user running the PS script has access to the drives) as well as literal paths like C:\users\.

A couple of things, you forgot the trailing slash at the end of your source (before the *.*) and you're missing a " at the end of your last destination folder. PowerShell will chew you up and spit you out for that :)

In PowerShellISE, you need to use the script window (which you have hidden or minimised there). Click on View > Show Script Pane

I suspect you want something like this:

LHcERuw.png

Note that my play button in the context bar is now green (because I've used the script window).
 
Thanks will have a bash at it tomorrow
Not sure how missed those out

Must have pressed ctrl +c before had properly selected it or something dumb
Yeah was being nosey looking around in options
Must have forgot to bring script window back
Thanks again for your patience
 
Back
Top Bottom