Here is my statement: Import-PWDocuments -InputFolder $InputFolder -ExtensionsOfInterest ".xtx" -ProjectWiseFolder $CurrentFolder.FullPath
$InputFolder = "C:\Stats"
There is a file in stats named d.xtx
In PWPS_DAB 126.96.36.199:
The above statement will take the file from the PC and place it in PW at $CurrentFolder.FullPath (expected)
In PWPS_DAB 188.8.131.52
The above statement will take the file from the PC and place it in PW at ($CurrentFolder.FullPath)\Stats and then place the file there
I ran the same query and got these results - the only difference was the version.
In 184.108.40.206 this cmdlet was updated (which may be the culprit).
We'll have to look into this. As you can see below from the module change log, there was a change to the cmdlet in version 220.127.116.11 to handle long paths.
Import-PWDocuments - Now supports importing from long paths on disk (Export-PWDocuments already supports writing to long paths on disk.)
For the time being, I would suggest importing to a temporary folder which will mimic the folder structure on the local drive, You can then move the documents to the correct location.
My script looks for the lowest level empty folder in a tree and places a file in that location. This is so iCS for PDF will distribute correctly (it won't copy empty folders). I won't know beforehand where the file will be placed. I tried placing the file to be placed in the root of C:\ but this didn't work (the file did not get placed in PW).
For example, could a switch be added to ignore the path on the local drive and just grab the file or could the import work from the root of C:? Either would allow me to import a file and place it in a folder in PW without the cmdlet mirroring the local folder structure. Thanks.
As it exists currently I have to zip the file and then use Import-PWDocumentsFromZip to have the functionality of the pre-1.6.1 cmdlet. Can a switch be added to give the option of importing from a long path?