I am new to Powershell and I am encountering a problem. I have two File Paths containing the two folders that I need to perform my Task. For example,
folderA = D:\Deployment\Packages\FileA
folderB= E:\Directories\FileB
FileA is a zipped file that has many other sub file directors and it will be unzipped later in the function to the location in File B. My issue currently is that when I delete a file in FileA, it will not update the file contents and when it is copied to FileB, the deleted file would still exist. The question is, how would I go about doing a code clean up to ensure that before FileA is unzipped, it will ensure that the deleted files will no longer exist?
To illustrate:
folderA = D:\Deployment\Packages\FileA
FileA Sub-directories:
bin
docs
test
test2
test3 (e.g. I delete this file)
FileB (Destination folder where I would unzip FileA and the expected outcome)
bin
docs
test
test2
Thus, I need a function or a code clean up that will ensure that before FileA is unzipped and copied/moved to FileB, the deleted file should no longer exist. Thus, in the example above, the test3 folder should not be found anymore. Thank you, help would be appreciated.