Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
I have used ExportSourceControlledEntitiesToZipFile method to Export Project Data to Zip file in Folder.
I am getting below error if I try to open that folder also.
Solved! Go to Solution.
Most likely the @ is the issue.
I'd recommend rewriting your script to create folders without special characters.
Go onto the server directly to remove this folder.
If you don't have direct server access, you can do some research into escape characters and try to delete it with an escape character at least for the @ symbol
What I'm not sure is if you need to do a URL escape %40 or force it into the jscript as a string. You may have to do it through a service though not the direct execute of the filerepository service
Most likely the @ is the issue.
I'd recommend rewriting your script to create folders without special characters.
Go onto the server directly to remove this folder.
If you don't have direct server access, you can do some research into escape characters and try to delete it with an escape character at least for the @ symbol
What I'm not sure is if you need to do a URL escape %40 or force it into the jscript as a string. You may have to do it through a service though not the direct execute of the filerepository service
Yes Removing @ from Foldername works.
Is there any way to rename zip file generated by ExportSourceControlledEntitiesToZipFile method ?
Currently its taking Projectname by Default and Overwrites if exported on same location. I don't want it to overwrite but create new zip if export service is run again.
Manual Export Allows scope to name the zip so there should be way.
Don't think there are options in the unzip command, so I would recommend to anticipate the overwrite and place them in differently named folders from the start.
Hi @PaiChung
I found way to rename file. Its working If I execute rename service from SystemRepository thing but if same method is in Script then it doesn't rename. I am using Below code.
Things["SystemRepository"].RenameFile({
path: "/" + destinationpath + "OEE.zip" /* STRING */,
name: zipfilename /* STRING */,
overwrite: True /* BOOLEAN */
});
I have tested all variables are correct.
Not exactly sure what might be the issue sorry, either not treating it as a string, or maybe filtering out characters that aren't permitted.