Quantcast
Channel: PowerShell.org » All Posts
Viewing all articles
Browse latest Browse all 13067

Copying Images(.JPG) to a Zip Folder prior to Sftp

$
0
0

$Images = Get-ChildItem -Path C:\Photos\*.jpg
# i test the variable using $Source and see that the images are there.
Foreach ($_. in $Source){
Copy-ImageToOrganizedFolder -Path C:\Photos2\$_.Jpg
Start-Sleep -Milliseconds 2000
}

I am then prompted for a Value,
WHich then gives an error the path’s format is not supported.
This is just in test phase. i have tried many variations including copy-toZip

What i will eventually be doing is copying thousands of .jpeg’s to a Zipped folder verbatim.
There can be no name changes or resizes(resizing is my next project which will be implemented before this one)
JUst a copy to zip as is. I have an ssis package which will then sftp the folder/contents
i will also then need to implement the archive attribute so in future runs only uncopied images will be processed
(this may change due to people changing their images.)
But for now can someone help me with the basic get images >> copy and write to Zip location.

I thank you for the code and help and ask if it isnt to much to add lots of comments as i need to know what is happening and why or i feel i will never learn.


Viewing all articles
Browse latest Browse all 13067

Latest Images

Trending Articles



Latest Images