Adding a file to an already created Archive throws error

Hello Experts,
In one of the WLST python scripts, we had a piece of code which was adding a file to an already created archive. Below is the code snippet:
import zipfile
try:
conn='1.properties'
fileName='/home/pbnagara/temp/Zip1.par'
myZip = zipfile.ZipFile(fileName, mode='a')
myZip.write(conn)
myZip.close()
except Exception:
print 'Exception occurred while writing to Zip file: ' + fileName
--> it makes use of the standard python module [zipfile] to add a file to the archive.
This code has started failing [for some strange unknown reason] when we upgraded.
The same script works fine in a standalone mode[using the system's default python packages] but fails only when run within WLST.
Does WLST package a different set of zipfile libraries? Can anyone point out what might be going wrong here?

I did get a reply from someone on the jfreechart forum, but need to ask more questions. This was his reply:
Hi Allyson,
You are trying to add a (subclass of) JFrame to a JPanel...that won't work, of course, and Java tells you so.
You need to create a ChartPanel to display your chart. This is a subclass of JComponent, which you can happily add to a JPanel (or any other container).
Regards,
Dave Gilbert
Here is the code for the method:
private void LineChartFrame() {
double[][] data = new double[][] {
{ 1.0, 4.0, 3.0, 5.0, 5.0, 7.0, 7.0, 8.0 },
{ 5.0, 7.0, 6.0, 8.0, 4.0, 4.0, 2.0, 1.0 },
{ 4.0, 3.0, 2.0, 3.0, 6.0, 3.0, 4.0, 3.0 }
DefaultCategoryDataset dataset = new DefaultCategoryDataset(data);
// set the series names...
String[] seriesNames = new String[] { "First", "Second", "Third" };
dataset.setSeriesNames(seriesNames);
// set the category names...
String[] categories = new String[] { "Type 1", "Type 2", "Type 3", "Type 4", "Type 5", "Type 6", "Type 7", "Type 8" };
dataset.setCategories(categories);
// create the chart...
chart = ChartFactory.createLineChart(
"Line Chart Demo 1", // chart title
"Category", // domain axis label
"Value", // range axis label
dataset, // data
true, // include legend
true, // tooltips
false); // urls
chartPanel = new ChartPanel(chart);
chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
setContentPane(chartPanel);
}And I tried this to add it to my panel:
jPanel1.add(chartPanel, null);But I get this error:
java.lang.NullPointerException
ChartPanel is defined globally in this file.
jPanel1 is my main panel that I want to add the chart to.
I am putting my last duke dollar on this in the hopes that someone can help. Thanks.
Allyson

Similar Messages

  • How do i move a picture from one pdf-file to another already created pdf-file with adobe reader?

    How do I move a picture from one pdf-file to another, already created pdf-file, with adobe reader?

    Reader doesn't have editing capabilities.

  • REST API: Create Deployment throwing error BadRequest (The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.)

    Hi All,
    We are trying to access the Create Deployment method stated below
    http://msdn.microsoft.com/en-us/library/windowsazure/ee460813
    We have uploaded the Package in the blob and browsing the configuration file. We have checked trying to upload manually the package and config file in Azure portal and its working
    fine.
    Below is the code we have written for creating deployment where "AzureEcoystemCloudService" is our cloud service name where we want to deploy our package. I have also highlighted the XML creation
    part.
    byte[] bytes =
    new byte[fupldConfig.PostedFile.ContentLength + 1];
                fupldConfig.PostedFile.InputStream.Read(bytes, 0, bytes.Length);
    string a = Encoding.UTF8.GetString(bytes, 0, bytes.Length);
    string base64ConfigurationFile = a.ToBase64();
    X509Certificate2 certificate =
    CertificateUtility.GetStoreCertificate(ConfigurationManager.AppSettings["thumbprint"].ToString());
    HostedService.CreateNewDeployment(certificate,
    ConfigurationManager.AppSettings["SubscriptionId"].ToString(),
    "2012-03-01", "AzureEcoystemCloudService", Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot.staging,
    "AzureEcoystemDeployment",
    "http://shubhendustorage.blob.core.windows.net/shubhendustorage/Infosys.AzureEcoystem.Web.cspkg",
    "AzureEcoystemDeployment", base64ConfigurationFile,
    true, false);   
    <summary>
    /// </summary>
    /// <param name="certificate"></param>
    /// <param name="subscriptionId"></param>
    /// <param name="version"></param>
    /// <param name="serviceName"></param>
    /// <param name="deploymentSlot"></param>
    /// <param name="name"></param>
    /// <param name="packageUrl"></param>
    /// <param name="label"></param>
    /// <param name="base64Configuration"></param>
    /// <param name="startDeployment"></param>
    /// <param name="treatWarningsAsError"></param>
    public static
    void CreateNewDeployment(X509Certificate2 certificate,
    string subscriptionId,
    string version, string serviceName, Infosys.AzureEcosystem.Entities.Enums.DeploymentSlot deploymentSlot,
    string name, string packageUrl,
    string label, string base64Configuration,
    bool startDeployment, bool treatWarningsAsError)
    Uri uri = new
    Uri(String.Format(Constants.CreateDeploymentUrlTemplate, subscriptionId, serviceName, deploymentSlot.ToString()));
    XNamespace wa = Constants.xmlNamespace;
    XDocument requestBody =
    new XDocument();
    String base64ConfigurationFile = base64Configuration;
    String base64Label = label.ToBase64();
    XElement xName = new
    XElement(wa + "Name", name);
    XElement xPackageUrl =
    new XElement(wa +
    "PackageUrl", packageUrl);
    XElement xLabel = new
    XElement(wa + "Label", base64Label);
    XElement xConfiguration =
    new XElement(wa +
    "Configuration", base64ConfigurationFile);
    XElement xStartDeployment =
    new XElement(wa +
    "StartDeployment", startDeployment.ToString().ToLower());
    XElement xTreatWarningsAsError =
    new XElement(wa +
    "TreatWarningsAsError", treatWarningsAsError.ToString().ToLower());
    XElement createDeployment =
    new XElement(wa +
    "CreateDeployment");
                createDeployment.Add(xName);
                createDeployment.Add(xPackageUrl);
                createDeployment.Add(xLabel);
                createDeployment.Add(xConfiguration);
                createDeployment.Add(xStartDeployment);
                createDeployment.Add(xTreatWarningsAsError);
                requestBody.Add(createDeployment);
                requestBody.Declaration =
    new XDeclaration("1.0",
    "UTF-8", "no");
    XDocument responseBody;
    RestApiUtility.InvokeRequest(
                    uri, Infosys.AzureEcosystem.Entities.Enums.RequestMethod.POST.ToString(),
    HttpStatusCode.Accepted, requestBody, certificate, version,
    out responseBody);
    <summary>
    /// A helper function to invoke a Service Management REST API operation.
    /// Throws an ApplicationException on unexpected status code results.
    /// </summary>
    /// <param name="uri">The URI of the operation to invoke using a web request.</param>
    /// <param name="method">The method of the web request, GET, PUT, POST, or DELETE.</param>
    /// <param name="expectedCode">The expected status code.</param>
    /// <param name="requestBody">The XML body to send with the web request. Use null to send no request body.</param>
    /// <param name="responseBody">The XML body returned by the request, if any.</param>
    /// <returns>The requestId returned by the operation.</returns>
    public static
    string InvokeRequest(
    Uri uri,
    string method,
    HttpStatusCode expectedCode,
    XDocument requestBody,
    X509Certificate2 certificate,
    string version,
    out XDocument responseBody)
                responseBody =
    null;
    string requestId = String.Empty;
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(uri);
                request.Method = method;
                request.Headers.Add("x-ms-Version", version);
                request.ClientCertificates.Add(certificate);
                request.ContentType =
    "application/xml";
    if (requestBody != null)
    using (Stream requestStream = request.GetRequestStream())
    using (StreamWriter streamWriter =
    new StreamWriter(
                            requestStream, System.Text.UTF8Encoding.UTF8))
                            requestBody.Save(streamWriter,
    SaveOptions.DisableFormatting);
    HttpWebResponse response;
    HttpStatusCode statusCode =
    HttpStatusCode.Unused;
    try
    response = (HttpWebResponse)request.GetResponse();
    catch (WebException ex)
    // GetResponse throws a WebException for 4XX and 5XX status codes
                    response = (HttpWebResponse)ex.Response;
    try
                    statusCode = response.StatusCode;
    if (response.ContentLength > 0)
    using (XmlReader reader =
    XmlReader.Create(response.GetResponseStream()))
                            responseBody =
    XDocument.Load(reader);
    if (response.Headers !=
    null)
                        requestId = response.Headers["x-ms-request-id"];
    finally
                    response.Close();
    if (!statusCode.Equals(expectedCode))
    throw new
    ApplicationException(string.Format(
    "Call to {0} returned an error:{1}Status Code: {2} ({3}):{1}{4}",
                        uri.ToString(),
    Environment.NewLine,
                        (int)statusCode,
                        statusCode,
                        responseBody.ToString(SaveOptions.OmitDuplicateNamespaces)));
    return requestId;
    But every time we are getting the below error from the line
     response = (HttpWebResponse)request.GetResponse();
    <Error xmlns="http://schemas.microsoft.com/windowsazure" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
      <Code>BadRequest</Code>
      <Message>The specified configuration settings for Settings are invalid. Verify that the service configuration file is a valid XML file, and that role instance counts are specified as positive integers.</Message>
    </Error>
     Any help is appreciated.
    Thanks,
    Shubhendu

    Please find the request XML I have found it in debug mode
    <CreateDeployment xmlns="http://schemas.microsoft.com/windowsazure">
      <Name>742d0a5e-2a5d-4bd0-b4ac-dc9fa0d69610</Name>
      <PackageUrl>http://shubhendustorage.blob.core.windows.net/shubhendustorage/WindowsAzure1.cspkg</PackageUrl>
      <Label>QXp1cmVFY295c3RlbURlcGxveW1lbnQ=</Label>
      <Configuration>77u/PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0NCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKg0KDQogIFRoaXMgZmlsZSB3YXMgZ2VuZXJhdGVkIGJ5IGEgdG9vbCBmcm9tIHRoZSBwcm9qZWN0IGZpbGU6IFNlcnZpY2VDb25maWd1cmF0aW9uLkNsb3VkLmNzY2ZnDQoNCiAgQ2hhbmdlcyB0byB0aGlzIGZpbGUgbWF5IGNhdXNlIGluY29ycmVjdCBiZWhhdmlvciBhbmQgd2lsbCBiZSBsb3N0IGlmIHRoZSBmaWxlIGlzIHJlZ2VuZXJhdGVkLg0KDQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioNCi0tPg0KPFNlcnZpY2VDb25maWd1cmF0aW9uIHNlcnZpY2VOYW1lPSJXaW5kb3dzQXp1cmUxIiB4bWxucz0iaHR0cDovL3NjaGVtYXMubWljcm9zb2Z0LmNvbS9TZXJ2aWNlSG9zdGluZy8yMDA4LzEwL1NlcnZpY2VDb25maWd1cmF0aW9uIiBvc0ZhbWlseT0iMSIgb3NWZXJzaW9uPSIqIiBzY2hlbWFWZXJzaW9uPSIyMDEyLTA1LjEuNyI+DQogIDxSb2xlIG5hbWU9IldlYlJvbGUxIj4NCiAgICA8SW5zdGFuY2VzIGNvdW50PSIyIiAvPg0KICAgIDxDb25maWd1cmF0aW9uU2V0dGluZ3M+DQogICAgICA8U2V0dGluZyBuYW1lPSJNaWNyb3NvZnQuV2luZG93c0F6dXJlLlBsdWdpbnMuRGlhZ25vc3RpY3MuQ29ubmVjdGlvblN0cmluZyIgdmFsdWU9IkRlZmF1bHRFbmRwb2ludHNQcm90b2NvbD1odHRwcztBY2NvdW50TmFtZT1zaHViaGVuZHVzdG9yYWdlO0FjY291bnRLZXk9WHIzZ3o2aUxFSkdMRHJBd1dTV3VIaUt3UklXbkFrYWo0MkFEcU5saGRKTTJwUnhnSzl4TWZEcTQ1ZHI3aDJXWUYvYUxObENnZ0FiZnhONWVBZ2lTWGc9PSIgLz4NCiAgICA8L0NvbmZpZ3VyYXRpb25TZXR0aW5ncz4NCiAgPC9Sb2xlPg0KPC9TZXJ2aWNlQ29uZmlndXJhdGlvbj4=</Configuration>
      <StartDeployment>true</StartDeployment>
      <TreatWarningsAsError>false</TreatWarningsAsError>
    </CreateDeployment>
    Shubhendu G

  • Stuffit expander - can't create archives, get error folder write protected

    I'm going nuts trying to figure out this problem. I figured it out on one user's machine over a month ago, but forgot what I did. I've installed Stuffit Deluxe 12 for a user. When she drags a folder on Stuffit, she gets an error that says "The destination folder "Desktop" is currently write-protected." Please select another destination."
    I've repaired permissions TWICE. I made sure the entire user's folder had the correct permissions and propagated them. This happens whether I try to save to the desktop, documents, whatever. I don't know what else to do.
    I've removed all traces of Stuffit and re-installed and still get the same problem.

    Repairing permissions does not touch the Home folder or its content. Check the permissions on the Home folder as well as the Desktop folder within. You can use Get Info to see the settings as well as change them if necessary.
    Home folder permissions:
    Owner=username with Read/Write privileges
    Group=admin with Read-only or Read/Write privileges
    Everyone=Read-only
    Desktop folder permissions:
    Owner=username with Read/Write privileges
    Everyone=No Access

  • Corrupt (?) zipped files from "Create Archive"

    I am repeatedly having trouble with files I zip using "create archive." Whether it's fonts or images, the recipients are not able to use the files I send (they seem to uncompress, but aren't readable). This is happening often enough that I wonder if there is a problem with the software. I didn't find this question asked when I did a search.
    thanks!

    Hi, casperr. Welcome to the Discussions.
    1. Are the recipients using Windows? If so, you may want to purchase a copy of StuffIt Deluxe, which can create archives that are both Windows-friendly and self-extracting.
    2. Have you tried opening the archives you have created with Create Archive to see if the contents of the archive you've created are AOK before sending them? That will help you determine if the problem is on your Mac, with the transmission, or a problem on the other user's computer.
    3. You might want to enquire as to how the recipients are unzipping the archives you have sent that they are finding problematic.
    Good luck!
    Dr. Smoke
    Author: Troubleshooting Mac® OS X

  • Adding item to array already created

    hey, im having problems adding to array that is already created, here is the code.
    the buffer reader and the inputs are created. an arrray list has also been created with elements already in it. ihave created 7 processes but want to add one more to it which is called pprocess 8.
    i have created the variables
    String name
    double amount
    double price
    i input these values no p[roblem with that all i need to do is add onto the process list. how do i do that, ive done this but no luck.
    Processes tProcesses8 = new Processes(tname , amount, tprice);
    tProcessList.add(tProcesses8);
    does anybody no the problem.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    i input these values no p[roblem with that all i need
    to do is add onto the process list. how do i do that,
    ive done this but no luck.
    Processes tProcesses8 = new Processes(tname , amount,
    tprice);
    tProcessList.add(tProcesses8);
    When you say "no luck", what do you mean?  Does it compile?  Does it throw an exception?  What is the failure mode?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • SPIMport is throwing error when import .aspx file second time onwards

    Hi,
    when I am trying to import already existing file (second import) the import is throwing error  -
    Error: Value does not fall within the expected range.
     [ListItem]   Debug:    at Microsoft.SharePoint.SPFieldMap.GetColumnNumber(String strFieldName, Boolean bThrow)
       at Microsoft.SharePoint.SPListItemCollection.GetRawValue(String fieldname, Int32 iIndex, Boolean bThrow)
       at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw, Boolean bThrowException)
       at Microsoft.SharePoint.SPListItem.GetValue(SPField fld, Int32 columnNumber, Boolean bRaw)
       at Microsoft.SharePoint.SPListItem.get_Item(Guid fieldId)
       at Microsoft.SharePoint.Deployment.ListItemSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector)
       at Microsoft.SharePoint.Deployment.XmlFormatter.CallSetObjectData(Object obj, SerializationInfo objectData, ISerializationSurrogate surrogate, ISurrogateSelector selector)
     Verbose: Performing final fixups.
     Progress: Import completed.
     Finish Time: 2/5/2015 4:37:25 PM.
     Duration: 00:18:41
     Total Objects: 5
     Finished with 0 warnings.
     Finished with 1 errors.
    I am unable to debug also. Though import is happening successfully. Thanks in advance

    Hi
    Use another forum for Webdynpro questions: Web Dynpro ABAP
    BR, Sergei

  • When creating a tablespace why should we enable LOGGING when a database is already on ARCHIVE LOG mode

    Question :
    When creating a tablespace why should we enable LOGGING when a database is already on ARCHIVE LOG mode ?
    Example:
    Create Tablespace
    CREATE SMALLFILE TABLESPACE "TEST_DATA"
    LOGGING
    DATAFILE '+DG_TEST_DATA_01(DATAFILE)' SIZE 10G
    AUTOEXTEND ON NEXT  500K MAXSIZE 31000M
    EXTENT MANAGEMENT LOCAL
    SEGMENT SPACE MANAGEMENT AUTO;
    LOGGING: Generate redo logs for creation of tables, indexes and  partitions, and for subsequent inserts. Recoverable
    Are they not logged and not recoverable if we do not enable LOGGING? What is that ARCHIVELOG mode does?

    What is that ARCHIVELOG Mode Does?
    Whenever your database is in archive log mode , Oracle will backup the redo log files in the form of Archives so that we can recover the database to the consistent state in case of any failure.
    Archive logging is essential for production databases where the loss of a transaction might be fatal.
    Why Logging?
    Logging is safest method to ensure that all the changes made at the tablespace will be captured and available for recovery in the redo logs.
    It is just the level at which we defines:
    Force Logging at DB level
    Logging at Tablespace Level
    Logging at schema Level
    Before the existence of FORCE LOGGING, Oracle provided logging and nologging options. These two options have higher precedence at the schema object level than the tablespace level; therefore, it was possible to override the logging settings at the tablespace level with nologging setting at schema object level.

  • Create database fails with error ORA-01505: error in adding log files

    hi all,
    hope someone can help me out, I'm trying to create a database using a SQL script, the content of the script is:
    create database testora
    user sys identified by oracle
    user system identified by oracle
    logfile group 1 ('/u01/app/oracle/oradata/testora/redo01a.log', '/u02/app/oracle/oradata/testora/redo01b.log') size 100m blocksize 512 reuse,
         group 2 ('/u01/app/oracle/oradata/testora/redo02a.log', '/u02/app/oracle/oradata/testora/redo02b.log') size 100m blocksize 512 reuse,
         group 3 ('/u01/app/oracle/oradata/testora/redo03a.log', '/u02/app/oracle/oradata/testora/redo03b.log') size 100m blocksize 512 reuse,
    maxlogfiles 5
    maxlogmembers 5
    maxdatafiles 100
    character set US7ASCII
    national character set AL16UTF16
    extent management local
    datafile '/u01/app/oracle/oradata/testora/system01.dbf' size 400m reuse
    sysaux datafile '/u01/app/oracle/oradata/testora/sysaux01.dbf' size 400m reuse
    default tablespace users
         datafile '/u02/app/oracle/oradata/testora/users01.dbf' size 500m reuse autoextend on maxsize unlimited
    default temporary tablespace tempts1
         tempfile '/u01/app/oracle/oradata/testora/temp01.dbf' size 20m reuse autoextend on maxsize 4g
    undo tablespace undotbs1
         datafile '/u01/app/oracle/oradata/testora/undotbs01.dbf' size 200m reuse autoextend on maxsize unlimited
    It fails in creating the database with the following output:
    SQL> @/home/oracle/Oracle_Scripts/testora_db_script.sql
    create database testora
    ERROR at line 1:
    ORA-01092: ORACLE instance terminated. Disconnection forced
    ORA-01501: CREATE DATABASE failed
    ORA-01505: error in adding log files
    ORA-01184: logfile group 1 already exists
    Process ID: 3486
    Session ID: 1 Serial number: 3

    sorry to revive this thread but i have one more issue with this. I created a database with DBCA insetead of CREATE DATABASE command and selected option for Fast Recovery Area space. This automatically set initialization parameter db_recovery_file_dest and db_recovery_file_dest_size, but did not create a OMF redo log group, but instead created three redo log groups with 1 member each.
    select * from v$logfile returns:
    1          ONLINE     /u01/app/oracle/oradata/testdb2/redo01.log     NO
    2          ONLINE     /u01/app/oracle/oradata/testdb2/redo02.log     NO
    3          ONLINE     /u01/app/oracle/oradata/testdb2/redo03.log     NO
    Any idea why if creating a database with create database command and specifying db_recovery_file_dest creates an OMF redo log group and with DBCA it doesn't?

  • Create Archive, how to change the behavior of the default file naming?

    From an earlier post on archiving via the contextual menu in the Mac OS X Finder:
    "If you archive a single item, the archived file has the name of the original item with a ".zip" extension. If you archive multiple items at once, the archived file is called Archive.zip."
    Is there a way to change the behavior of this?
    I ask because I want to archive a single file, say "photo.psd" and when I do I get an archive called "photo.psd.zip" - is there a way to create an archive from the contextual menu and have the original file extension be appended? - in this case I would want "photo.zip" to be the end result.
    Also, is there a way to change the behavior of archiving multiple files? To, say, create a differently named file afterwards instead of the default "Archive.zip" - perhaps something a little more descriptive but standard, like "YourFilesCompressed.zip" - something that would stay the same across each archive creation.
    Thanks, I've been manually renaming after all create-archive's. And I do realize other applications could probably do this, but I'm thinking there must be a way to do this in the finder, no? A terminal command? Any ideas would be appreciated.

    Try looking at the documentation for the ditto and zip Terminal commands.
    (14504)

  • LV 7.1 - How can I use installer to create folder with its files included w/o adding each file?

    I have several files to place in folders created by the installer. Can't seem to see how I can avoid adding each file individually at build time. Is there an easier way to do this? Simply "adding" a folder would be a solution.
    Thanks
    Fran

    Fran,
    I believe this question is directly addressed in this online Knowledgebase.
    Kind Regards,
    E. Sulzer
    Applications Engineer
    National Instruments

  • Can't create archive from file menu

    Hello,
    I can't create 'archive' (tar.gz) from file menu in Color (Save Archive As...).
    I don't have authorization problem on my folder project; i can create myself a tar.gz archive in the folder Archive of my Color's project.
    The system.log file said:
    Jul 16 09:45:51 fcp1 [0x0-0x1e01e].com.apple.color[215]: tar: Cowardly refusing to create an empty archive
    Jul 16 09:45:51 fcp1 [0x0-0x1e01e].com.apple.color[215]: Try `tar --help' or `tar --usage' for more information.

    some other users report difficulties, crashes, freeze-ups and very long save times associated with the Operating System and Finder. There is apparently some background file compression utility that may be interfering with your save routine. There are a couple of threads related to this issue on this forum, so a bit of searching may yield a solution.
    I haven't encountered it in nearly four years of day-to-day with three separate systems in either Tiger or Leopard. Suffice to say that if you have any third-party whiz-bang utilities running, COLOR is very vulnerable to OS corruption as it is a stripped-out race car that doesn't expect or tolerate much else when it comes to sharing the computer.
    jPo

  • How to script File Menu "Create Archive of..."

    I have been trying to script the File Menu's "Create Archive" command but i can't figure out how to add the quote characters around the items name when only one item is selected for archiving. I have tried the escape character but applescript errors on it. I can get it to work if I use menu item number, but that varies by system.
    here is what I have so far.
    try
    tell application "Finder"
    activate
    select item "PicaX4:BackUp:"
    end tell
    tell application "System Events"
    tell process "Finder"
    -- create archive
    click menu item "Create Archive of \"BackUp\" " of menu 1 of menu bar item "File" of menu bar 1
    end tell
    end tell
    on error errMsg
    end try
    on a related topic, how do I wait for the completion of the archive process so I can then do something with the zip file?
    any feedback would be greatly appreciated.
    thank you, greg

    Since 'Create archive' basically creates a .zip file, it would be far easier to use a shell script to do this:
    do shell script "/usr/bin/zip -r /Volumes/PicaX4/BackUp.zip /Volumes/PicaX4/BackUp"
    If you still want to take the UI approach you should note that the menu item uses 'smart' quotes “and” and not the regular quotes.

  • File Adapter - Error creating archive directory adapter file

    Hello,
    I've a interfase File to RFC. In sender CC i have Archive Directory.
    It occurs the follow error:
    Error creating archive directory adapter file
    The archive directory exists.
    any idea?
    thanks very much

    Hi Silvia,
    Check whether the user you are using for FTPing is having proper authorizations.
    Also, verify whether you have the archive directory in place.
    Regards,
    Neetesh

  • Adding a Date/Time stamp to videos already created

    We have someone using Elemets 8
    They need to add in the date/time stamp to video's that are already created.
    The camcorder we have does record this information but doesn't allow that information to be put onto the screen its a Canon HD HF200
    We were told by Adobe support we can do this but they wanted $39 plus $39 an hour.
    Anyone out there able to tell me how we can get this done for free

    PrE lacks the TimeCode Effect (unless it has been added in PrE 10?), that both PrPro and Adobe After Effects has. However, even that Effect does not do date/time, just Runtime TimeCode, but with some display alternatives.
    There are two programs called DVDate. One is/was freeware, and the other was inexpensive shareware. I do not have the two links handy, but believe that either will do what the user wishes.
    I know that in the past, one valued contributor, Neale, has posted the links, and has also given the details of what each of the programs can, and cannot do. Maybe he'll drop by this thread, and fill in the blanks that I am leaving here.
    Good luck,
    Hunt

Maybe you are looking for