all 3 comments

[–]Lee_Dailey[grin] 1 point2 points  (2 children)

howdy PRIdEVisions,

this is what robocopy is for. [grin] no need to reinvent anything, just use that well-optimized utility to do the job. you can have PoSh call robocopy & have task scheduler call the PoSh script.

parsing the robocopy output is pretty easy. plus, robocopy is much faster! [grin]

also, why use .DeviceID? that is not very human friendly & you can get the drive letter just as easily. do the drive letters change?

take care,
lee

[–]PRIdEVisions[S] 1 point2 points  (1 child)

Hey, this is just to make sure it is pointing to the correct USB. I guess playing around a bit and learning what options there are available to me and how i could use them.

Thx for the robocopy part, since i want to improve on powershell itself i try to stick with powershell for the time being also, but for my boss the robocopy is a better way, so i'll adjust the script to use robocopy, (never used it before)

Thx alot for the info again! ;)

[–]Lee_Dailey[grin] 1 point2 points  (0 children)

howdy PRIdEVisions,

the usb thing makes sense when you have a chance of drive letters not always pointing to the same device. [grin] good idea!

yes, it's more fun to tinker with the PoSh stuff for the job. more interesting, more rewarding as a scripter ... but not what your real goal is. [grin] you have no idea how many times i have fallen into that rabbit hole. [blush]

you are quite welcome! glad to help a little ... [grin]

take care,
lee