Save the file automatically in a default folder

Hello

I have a problem with the selection of a default directory to save the file (write on the worksheet). I want WriteToSpreadsheet automatically as a NEW FILE without inviting the user to click on the Ok button every time on "save file as" dialog box.

Please find the attached photo to find the code.

Analogy: I just want the program automatically save the file with a new file name each loop without pop up a dialog to the user to confirm the action.

Thank you!

Aerts

Well, you already have the constant where he must go by default data.  You can just use it.

Another option would be to create a Subvi to only call the file dialog box when the first call and record the path of the folder in feedback.  Then the selected folder has only one in need first.

Probably the best option would be to have the user to select the folder where the program for the first time and this way through the while loop.

Tags: NI Software

Similar Questions

  • where to save the files under options the file name is duplicated how to remove an additional folder with the same name

    Under Options in Firefox, I clicked on save the files under downloads, but the file name twice and an additional file with the same name is created in the folder, i.e.:

    G:\Akbar's Songs\HAMARA DOWNLOADS\HAMARA FORUMS DOWNLOADS FORUMS

    As you can see the file repeats, how can I fix it?

    Also the music files, I download from a site of downloads as a WinRar file and I need to open it. Y at - it an option where the file opens automatically in the folder I chose?

    Thanks a lot for your help.

    Hi Akush, when you install 7 - zip, make itself the default application to open .zip and .rar files. So if you double click on the .rar file, it should open in 7 - zip. If you prefer to decompress immediately, right click the file and look for new 7 - zip items in the menu. I can't think of a way to do this automatically, however.

  • "Save image under" has changed, without memory of the choice of folder, save the file invisible name, options does not help.

    General options "always ask me where to save files. I seem to get the other option - save the file in (a specific directory) option is selected. Perhaps there is an automatic update of Firefox? The problem started there around the time that Qt Creator, I installed a few days.

    The fixed! Uninstalled windows 7/24 update and restarted. One may wonder what is happening to the Mircosoft to shoot their software in the foot like that?

  • In windows mode 8, when I need to save a file (photo), I can't make a new folder to save the file.

    In windows mode 8, using Hotmail app, I don't have the opportunity to make a new folder to save an attached file in an email.

    Hi Lince,

    Please answer this question to get more clarity on this issue.

    -You talk to the Mail app?

    If you are referring to the Mail application, then by saving an attachment of an e-mail can be done in a folder on the computer. So, if you want to create a new folder to save the file attachment, you must create it before you download the attachment of the e-mail.

    Response with the State of the question and we will be happy to offer you our help.

  • Using the file class - muse. by default on my computer and not the last used folder.

    Using the file class - muse by default to my computer and not to the last used folder.

    Hello Perri,

    I tested on my end, and it seems that the issue is ongoing because of Air Version 3.8 was last updated. If restore you the version of Air to 3.7 this problem would be fixed.

    Here is the link to the page for the available versions of Adobe Air: http://helpx.adobe.com/air/kb/archived-air-sdk-version.html and you can use this link to download Adobe Air version 3.7:
    http://download.Macromedia.com/air/Win/Download/3.7/AdobeAIRInstaller.exe (Windows)

    http://download.Macromedia.com/air/Mac/download/3.7/AdobeAIR.dmg (Mac)

    Hope this information helps.

    Kind regards

    Fox

  • How to incorporate the timestamp and file name automatically select and save the file dialog?

    Hello

    I try to incorporate the name of the file that is the registration of the end user with the timestamp in the selected and save file dialog box. Can you help me?

    Thank you

    Hi Mike227,

    I couldn't find a way to immediately make the bat. I guess you need to mess with ActiveX to do. I found an msdn page that could help with this.

    Have you considered simply concatenating the name of the file and the time stamp with a path of the file and save the file when you create it, without inviting the user?

  • why I can't download and save the files to my laptop... it disappears in the air... I have windows vista and ie8... Please help I'm going crazy... this laptop is my tool work... thank you. __

    why I can't download and save the files to my laptop... it disappears in the air... I have windows vista and ie8... Please help I'm going crazy... this laptop is my work tool... Thank you.

    Hello locness2411,

    Have you checked your download folder? Also you can put where you want to save a file to the desktop as, for example. Take a look at these links: http://www.tweaklibrary.com/Software_Applications/Internet-Explorer/27/Set-default-download-path-of-Internet-Explorer/10153/ or http://www.windowsreference.com/internet-explorer/how-to-change-the-default-download-directory-for-internet-explorer/ that can help you in what you want to change. Hope this helps you. Let us know anyway. Make it a great day!

    "And in the end the love you take, is equal to The Love You Make" (The Beatles last song from their latest album, Abbey Road.)

  • (webutil) How to save the file in a specific way?

    Hello

    I have this part of the code
    Arglist := OLE2.Create_Arglist;
      OLE2.Add_Arg(Arglist,'c:\Export.xls');
      OLE2.Invoke(workbook, 'SaveAs', Arglist);
      OLE2.Destroy_Arglist(Arglist);
      -- release workbook
      OLE2.Release_Obj(workbook);
      OLE2.Release_Obj(workbooks);
      OLE2.Release_Obj(application);
    who saves the excel C:\Export.xls file. I tried to open a file save dialog box, with
    BEGIN
               
      file_name_cl := CLIENT_GET_FILE_NAME('C:\Export', 'ExportExcel.xls', 'XLS Files (.xls)|*.xls|', NULL, SAVE_FILE, TRUE);
      file_name_cl := SUBSTR(file_name_cl,1,LENGTH(file_name_cl));
      --
      IF file_name_cl IS NULL THEN
         MESSAGE('INSIDE EXCEPTION STATEMENT');
         RAISE user_cancel;
      END IF;
    {code]
    
    But the file isn't saved. Why?
    
    So here is all the code
    PROCEDURE export_din_datablock (p_block varchar2) is

    REQUEST OLE2. OBJ_TYPE;
    WORKBOOKS OLE2. OBJ_TYPE;
    WORKBOOK OLE2. OBJ_TYPE;
    SPREADSHEETS OLE2. OBJ_TYPE;
    WORKSHEET OLE2. OBJ_TYPE;
    Arglist OLE2. LIST_TYPE;
    CELL OLE2. OBJ_TYPE;
    J INTEGER;
    INTEGER K;
    file_name_cl VARCHAR2 (32767).
    USER_CANCEL EXCEPTION;
    Workfont OLE2. OBJ_TYPE;
    WorkInterior OLE2. OBJ_TYPE;
    m_item varchar2 (40);
    m_tot_columns number: = 0;
    LC$ target Varchar2 (256): = "text.xls";
    LC$ Fic Varchar2 (256);

    -Inner Proc.
    Procedure put_cell (number of no_lig,
    Number of Col_num,
    put_value varchar2,
    FONT_NAME varchar2 default null,
    font_size directory by default null,
    font_style varchar2 default null, - we can use pune "BOLD" pentru "BOLD", "ITALIC" pentru italics, etc.
    font_color directory by default null) is
    Begin
    Arglist: = OLE2.create_arglist;
    OLE2.add_arg (arglist, row_num);
    OLE2.add_arg (arglist, col_num);
    cell: = OLE2.get_obj_property (Worksheet, 'Cells', Arglist);
    OLE2.destroy_arglist (arglist);
    OLE2.set_property (Cell, 'Value', put_value);

    Workfont: = OLE2.get_obj_property (cell, 'Make');
    WorkInterior: = OLE2.get_obj_property (cell, 'Interior');
    If font_name is not null then
    OLE2.set_property (Workfont, 'Name', FONT_NAME);
    End if;
    If font_size is not null then
    OLE2.set_property (Workfont, 'Size', font_size);
    End if;
    If font_style is not null then
    OLE2.set_property (Workfont, font_style, 1);
    End if;
    If font_color is not null then
    OLE2.set_property (Workfont, font_color 'ColorIndex');
    End if;
    OLE2.release_obj (workfont);
    OLE2.release_obj (workinterior);
    OLE2.release_obj (cell);
    End;


    BEGIN

    file_name_cl: = CLIENT_GET_FILE_NAME ('C:\Export', 'ExportExcel.xls', ' file XLS (.xls) | * .xls |', NULL, SAVE_FILE, TRUE);
    file_name_cl: = SUBSTR (file_name_cl, 1, LENGTH (file_name_cl));
    --
    IF file_name_cl IS NULL THEN
    MESSAGE ("INSIDE THE EXCEPTION STATEMENT");
    RAISE user_cancel;
    END IF;

    APPLICATION: = OLE2. CREATE_OBJ ('Excel.Application');
    OLE2. SET_PROPERTY (application, 'Visible', true);

    WORKBOOKS: = OLE2. GET_OBJ_PROPERTY (APPLICATION, 'NOTEBOOKS');
    WORKBOOK: = OLE2. INVOKE_OBJ (WORKBOOKS, "ADD");
    WORKSHEETS: = OLE2. GET_OBJ_PROPERTY (WORKBOOK, 'WORKSHEETS');
    WORKSHEET: = OLE2. INVOKE_OBJ (SPREADSHEETS, "ADD");
    OLE2.set_property (spreadsheet, 'Name', 'leaf-ul meu');

    GO_BLOCK (p_block);
    PREMIER_ENREGISTREMENT;
    -prima linie dedicated numelui sunt; pe linia incep 2.
    J: = 2;
    K: = 1;
    LOOP
    m_item: = get_block_property (p_block, first_item);
    K: = 1;
    Loop
    exit in M_ITEM IS NULL;
    If not id_null (find_item (p_block |'.)) ' || m_item)) then
    -daca point-urile sunt type specificat (+ eventual alte conditii), atunci to export data din ele
    If get_item_property (p_block |'.) ' || m_item, item_type) IN ('ELEMENT of TEXT', 'VIEW ARTICLES', 'LIST', 'CHECKBOX')
    and get_item_property (p_block |'.) ' || m_item, visible) = "TRUE" then
    If j = 2 then
    -preiau dinamic name if sunt afisez pe linia 1, cu "BOLD"
    put_cell (1, k, get_item_property (p_block |'.)) ' || m_item, column_name), null, null, 'FAT');
    end if;
    If not name_in (p_block |'.) ' || m_item) is NULL then
    -data afisez
    put_cell (j, k, name_in (p_block |'.)) ' || m_item));
    End If;
    K: = k + 1;
    end if;
    end if;
    -merg urmatoarea inregistrare
    m_item: = get_item_property (p_block |'.) ' || m_item, NEXTITEM);
    END LOOP;
    J: = J + 1;
    When the output: system.last_record = "TRUE";
    NEXT_RECORD;
    END LOOP;
    OLE2. Release_Obj (Worksheet);
    OLE2. Release_Obj (Worksheets);
    -Save the created Excel file
    Arglist: = OLE2. Create_Arglist;
    OLE2. Add_Arg (arglist, 'c:\export.xls');
    OLE2. Invoke (Binder, 'SaveAs', Arglist);
    OLE2. Destroy_Arglist (arglist);
    -Release of workbook
    OLE2. Release_Obj (Workbook);
    OLE2. Release_Obj (Workbooks);
    OLE2. Release_Obj (application);
    MESSAGE ("Export cu success!'");
    END;
    Please help.
    Thanks                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            

    Roger

    Not to be confused... YOU read my previous POST.

    Also answer me...
    How do you want to save the file?
    1. replace or add to the file in the folder?
    2. create a new file in the folder?

    If you answer is first, change your code in a more dynamic way

    -Save the opened Excel file
    rglist: = OLE2. Create_Arglist;
    OLE2. Add_Arg (arglist, file_name_cl);
    OLE2. Invoke (Binder, 'SaveAs', Arglist);
    OLE2. Destroy_Arglist (arglist);

    So then you can give it

    -Save the created Excel file
    rglist: = OLE2. Create_Arglist;
    OLE2. Add_Arg(arglist,'c:\export\newexcelexport.xls');
    OLE2. Invoke (Binder, 'SaveAs', Arglist);
    OLE2. Destroy_Arglist (arglist);
    Your file will be saved in the "C:\export\" a folder with the name newexcelexport

  • Where Cookies-Exceptions are stored so that I can save the file?

    I have access to my computer using 'Accept cookies from sites' - 'Exceptions'.

    Whenever I have reinstall FireFox, I have to manually add the sites one by one to this list of exceptions.

    If I knew what file these exceptions were stored in, I could save the file and do not have to recreate them each time.

    Thank you.

    All permissions except password exceptions are stored in permissions.sqlite in the Firefox profile folder

    The permissions.sqlite file stores exceptions allow and block for cookies, images, pop - up windows and installation of the extensions (software).

  • Error message: to restore enough memory for programs running, save the file and then close or restart all programs

    It said "restore enough memory for programs to operate correctly, save the file and then close or restart all open programs".

    I changed the size of paging and says always the same, I have 1.5 GB free RAM, but don't know how to find or what to do 'virtual memory '.  Have windows 7.

    I started the safemode and run also memory dignostics and nothing found, please help, cannot afford to take a shop or get a new computer, I'm using another pc.

    I was recommended to download and. Run 'hitmanpro3'... but if anyone has had this problem and solved it or know how, please help!

    Thank you

    Hello

    Please contact Microsoft Community.

    I understand that you receive an error related to the lack of virtual memory. This error message appears when running any program that requires more memory your computer has, or running in the background, Windows manages the system memory by saving the data between physical memory and virtual memory. In order to help you better, please provide us with the following information:

    What is the brand and model of your computer?

    I suggest you follow the methods and check them off below if this solves the problem.

    Method 1: Clean boot

    A clean boot is a troubleshooting technique that allows you to get the computer facing up and running so that you can determine what elements of the normal starting procedure problems.

    How to perform a clean boot in Windows

    http://support.Microsoft.com/kb/929135

    Note: Once you are done with the clean boot, follow the section How do I reset the computer to start as usual after a clean boot troubleshooting under more information in the article to put your computer to normal startup.

    Method 2: Prevention of insufficient memory problems

    Follow the steps mentioned in the link and the check, it solves the problem. Follow the evolution of the size of the virtual memory section

    http://Windows.Microsoft.com/en-us/Windows/preventing-low-memory-problems#1TC=Windows-7

    Method 3: Virus Scan

    Microsoft Safety Scanner is a free burner that can be used to analyze a system for computer viruses and other forms of malware.

    Microsoft safety scanner

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Warning: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

    Additional information: Windows optimize for better performance

    Hope this information helps. Response with status so that we can help you.

  • Unable to save the files to the desktop, the error msg says I don't have permission to do this and to cantact admin but I m user having admin status.

    IN WINDOWS 7, cannot save the files to the desktop, the error msg says I don't have permission to do this and to cantact admin but I m user having admin status. ALL SUGGESTED SOLUTUTION? THE FILE in question is created with ms word 2007. I can record on other places lik e in drive D: etc.

    I could open your Explorer of files and go to C:\Users\Vanbee (or any folder of your user name), then right click on the folder on the desktop it there and go to properties.  On the Security tab, make sure that you have a full control on the folder.

  • I want to save the files in tif format in windows 7, 64-bit operating system and Office 2010.

    Hi team, support

    I'm using windows 7, 64-bit and Office 2010 operating system. I want to save web files(e-invoices) in .tif format.

    Because the tif format is only way to download web files(e-invoices) in the download system.

    Please tell us how can I save the files directly in tif like Window XP format.

    He had no problem when I used Windows XP. I could save the files in tif through Microsoft Office Image Writer as a default format.

    A tif file is simply an image

    Office 2010 does not include Microsoft Office Image Writer, he made the MS featured xps document writer and send to OneNote (according to the version of office)

    http://Office.Microsoft.com/en-us/Word-help/save-as-XPS-HA102351576.aspx

    http://www.Microsoft.com/en-GB/download/details.aspx?ID=20261#system-requirements

    You can also think about saving to PDF

    Nothing else; Re-post for groups of office, not this group of generic programs because it has nothing to do with the victory

  • Unable to save the file in a specific location

    I created a C:\Users\Projects\Writing projects folder to save my writing projects in. I tried to put a Word file in this folder and I was told that I don't have administrator rights to save a file in this location. I must have administrator rights, because it is my PC, and I have only set up an account with which I set install programs, remove any software, create folders, etc etc, so what happens? He told me that I could save the file under 'my documents '. I don't want to post here, because a load of other detritus accumulates in this folder, and these are files of project specific I want to keep separate (I'm a writer).

    Hmmm, I just did exactly that on my computer with Word 2007 and Home Premium from Windows 7 64 and had no problem at all.  If you have the professional version or complete edition, you can run in a part of the increased security, maybe.  You can still create these folders as subfolders of the My Documents folder and isolate what you put there like that.  Another thing you could try would be to create a LIBRARY that points to the C:\Users\Projects\Writing project that you created.  This might be more likely to succeed.

    One thing I just noticed that is not in your post is your user ID.  You create these records in C:\Users\yourID\Projects\Writing projects.  That's what I was doing.

    Good luck.

  • Save the file with the same name

    How to change the script to save the file with the same name?


    
    
    
    
    //SaveforWebSP.jsx  
    
    
    
    //Save a fixed width image with a size constraint in its original folder  
    
    
     
     
    
    
    
    var docRef = activeDocument;  
    
    
    
    var outputFolder = docRef.path;  
    
    
     
     
    
    
    
    NamesaveRef = new File( outputFolder + "/reference.jpg" );  
    
    
    
    var NewfileRef = new File( NamesaveRef )  
    
    
     
     
    
    
    
    // quality/size constraints  
    
    
    
    var w = 1920; // new file width  
    
    
    
    var MaxSz =  361440; // max. 360Kb  
    
    
    
    var Qlt = 100; // initial quality 100  
    
    
    
    var x = 1; // decreasing step  
    
    
     
     
    
    
    
    // resize the image to the right width  
    
    
    
    docRef.resizeImage(UnitValue(w,"px"),null,100,ResampleMethod.BICUBICSHARPER);  
    
    
     
     
    
    
    
    // Perform the first SaveForWeb Operation  
    
    
    
    ExpWeb(NewfileRef, Qlt);  
    
    
     
     
    
    
    
    // Keep trying to save the file with max. Qlt, but under MaxSz 
     
    
    
    
    while (NewfileRef.length > MaxSz)  
    
    
    
    {  
    
    
          
    Qlt = Qlt - x;  
    
    
          
    NewfileRef = new File( NewfileRef );
     
    
    
          
    NewfileRef.remove();  
    
    
          
    ExpWeb(NewfileRef, Qlt);  // Perform a new SaveForWeb Operation, with slightly lower Qlt  
    
    
             
    if (Qlt <= 40) {  
    
    
               
    alert("The file can't be saved with the desired size AND quality.");  
    
    
               
    break  // break the loop whenever the quality is as low as 50 (this shouldn't need to happen)  
    
    
             
    }  
    
    
    
    }  
    
    
     
     
    
    
    
    var FileSz = NewfileRef.length/1024;  
    
    
    
    FileSz = Math.round(FileSz);  
    
    
     
     
    
    
    
    // close the original file without saving  
    
    
    
    activeDocument.close(SaveOptions.DONOTSAVECHANGES);  
    
    
     
     
    
    
    
    // SaveForWeb Export, with the desired constraints and parameters  
    
    
    
    function ExpWeb(FileNm, Qlt)  
    
    
    
    {  
    
    
          
    var options = new ExportOptionsSaveForWeb();  
    
    
          
    options.quality = Qlt;   // Start with highest quality (biggest file).  
    
    
          
    options.format = SaveDocumentType.JPEG;   // Save Format for the file  
    
    
          
    docRef.exportDocument(File(FileNm), ExportType.SAVEFORWEB, options);  
    
    
    
    } 
    
    
    
    
    

    Change of line 25 to:

     var docName = docRef.name.split('.')[0];
     NamesaveRef = new File( outputFolder + "/"+docName +".jpg");
    
  • Illustrator CS6 mode does not respond when you save the file

    Hello

    For the past two weeks Illustrator switch mode not responding whenever I want to save a file. He stays like that for all 30secs and then he finally saves the file / changes / updates.

    I use Adobe CS6 Design & Web Premium edition for Windows.

    I have uninstall and install the software several times but nothing seems to work.

    Any help will be appreciated.

    Manual,

    Just to be sure: is there a printer correctly installed, connected and turned on if it's a physical printer (you can use Adobe PDF/Acrobat Distiller as a printer by default without the need to have a printer on, of course you will need to specify when you really need print on paper)?

Maybe you are looking for