How to remove all files in a directory in java?

I have tried method delete() of File ,
but no effect!
can anyone help me!
thank you

So, you have a directory and you want to delete all files in the directory. Here is some (untested) code:
File dir = new File("C:\\tempdir");
File[] files = dir.listFiles();
for (int i = 0; i < files.length; ++i) {
  if (files.isFile()) {
files[i].delete();
Jesper

Similar Messages

  • File Dialog - How to remove all files pattern in LV 8.x

    How to remove "all files" pattern in LV 8.x in the file dialog.
    Is it possible?
    Thanks
    Dany
    Dany Allard

    If it is a security issue, you will probably need to implement a custom dialog and actively filter for file types.  No matter what pattern you have showing, the user can type a pattern into the dialog and get anything they want.  In addition, file extension is not sufficient to determine file type.  You should probably check the file itself to ensure it is an HTML file and does not have any embedded nastiness.
    Fortunately, custom dialogs are easy to make.  Using the event structure, you can filter inputs as well, so that only HTML files will be accepted.  Good luck.  Let us know if you need more help.
    This account is no longer active. Contact ShadesOfGray for current posts and information.

  • How to make button to format a HardDrive or USB, How to remove all files from folder, and How to delete a process in listbox with a textbox?

    Hello!
    Here's the question with explaniation: How can i format the USB or Drive by clicking a button what's meant for it?
    and the second question what's also in vb.net: How can i remove all files from folder ? 
     Here's the Look of program: *
    Using the PC button, it will delete the free space of the PC, do you guys/girls know where it's location?

    Example Code:
    Imports System.Runtime.InteropServices
    Imports System.IO
    Public Class Form1
    Dim CBoxDrives As New ComboBox
    WithEvents FButton As New Button
    <DllImport("shell32.dll")> _
    Private Shared Function SHFormatDrive(ByVal hwnd As IntPtr, ByVal drive As UInteger, _
    ByVal fmtID As UInteger, ByVal options As UInteger) As ULong
    End Function
    Private Enum SHFormatFlags As Integer
    SHFMT_ID_DEFAULT = &HFFFF
    SHFMT_OPT_FULL = &H1
    SHFMT_OPT_SYSONLY = &H2
    SHFMT_ERROR = &HFFFFFFFF
    SHFMT_CANCEL = &HFFFFFFFE
    SHFMT_NOFORMAT = &HFFFFFFD
    SHFD_FORMAT_FULL = 0 ' full format
    SHFD_FORMAT_QUICK = 1 ' quick format
    End Enum
    Private Sub FButton_Click_1(sender As System.Object, e As System.EventArgs) Handles FButton.Click
    If CBoxDrives.Text = "" Then
    MsgBox("No Drive Selected")
    Exit Sub
    End If
    Dim Iresult As ULong = SHFormatDrive(CType(Me.Handle.ToInt32, IntPtr), CUInt(Asc(CBoxDrives.Text.Substring(0, 1)) - Asc("A")), CUInt(SHFormatFlags.SHFMT_ID_DEFAULT), 1)
    End Sub
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Me.Size = New Size(200, 100)
    With FButton
    .Size = New Size(50, 25)
    .Location = New Point(5, 5)
    .Text = "Format"
    End With
    Me.Controls.Add(FButton)
    With CBoxDrives
    .Size = New Size(50, 25)
    .Location = New Point(75, 5)
    .DropDownStyle = ComboBoxStyle.DropDown
    End With
    Me.Controls.Add(CBoxDrives)
    Dim DrivesFound As Integer = 0
    Dim allDrives() As DriveInfo = DriveInfo.GetDrives()
    Dim d As DriveInfo
    For Each d In allDrives
    If ((d.DriveType = DriveType.Fixed) Or (d.DriveType = DriveType.Removable)) AndAlso Environment.GetEnvironmentVariable("SYSTEMROOT").StartsWith(d.Name) = False Then
    CBoxDrives.Items.Add(d.Name)
    DrivesFound += 1
    End If
    Next
    CBoxDrives.SelectedIndex = DrivesFound - 1
    End Sub
    End Class

  • How to get all files in one directory

    Hi there,
    is there any way to get all the files in one directory?
    e.g. a method
    File[] getAllFiles(String directory){
    Thank you

    Just out of interest, which part of the File API was confusing?
    http://java.sun.com/j2se/1.5.0/docs/api/index.html
    If you look down the left-hand side, you'll see a frame listing "All File". If you select "File" from that list, it opens up the API in the right-hand frame. Quite near the top you'll find "listFiles".
    I only ask as this (and other questions easily answered by looking at the API) are frequently asked. Did you overlook it when you read the API or did you just not read it?
    I really want to know. I think there is scope to cater for that behaviour within this site. A nice API finder would be good; something more intelligent than the search function (which people use less frequently even than the API docs).

  • How to delete all file in a directory

    Hi,
    Myself is Lokesh....can anyone tell me how can we delete all existing mail file which i kept in linux (PATH IS: /usr/share/mailfile/)...the mail file extension is *.MAIL. Please help me in sortout this problem...

    See listFiles (FileFilter) and delete ().

  • How can I create a array with all files from a directory

    How can I create a array of files or varchar with all files from a directory?

    I thought the example could be improved upon. I've posted a solution on my blog that doesn't require writing the directory list to a table. It simply returns it as a nested table of files as a SQL datatype. You can find it here:
    http://maclochlainn.wordpress.com/2008/06/05/how-you-can-read-an-external-directory-list-from-sql/

  • How to get the file size (in bytes) for all files in a directory?

    How to get the file size (in bytes) for all files in a directory?
    The following code does not work. isFile() does NOT recognize files as files but only as directories. Why?
    Furthermore the size is not retrieved correctly.
    How do I have to code it otherwise? Is there a way of not converting f-to-string-to-File again but iterate over all file objects instead?
    Thank you
    Peter
    java.io.File f = new java.io.File("D:/todo/");
    files = f.list();
    for (int i = 0; i < files.length; i++) {
    System.out.println("fn=" + files);
    if (new File(files[i]).isFile())
         System.out.println("file[" + i + "]=" + files[i] + " size=" + (new File(files[i])).length() ); }

    pstein wrote:
    ...The following code does not work. Work?! It does not even compile! Please consider posting code in the form of an SSCCE in future.
    Here is an SSCCE.
    import java.io.File;
    class ListFiles {
        public static void main(String[] args) {
            java.io.File f = new java.io.File("/media/disk");
            // provides only the file names, not the path/name!
            //String[] files = f.list();
            File[] files = f.listFiles();
            for (int i = 0; i < files.length; i++) {
                System.out.println("fn=" + files);
    if (files[i].isFile()) {
    System.out.println(
    "file[" +
    i +
    "]=" +
    files[i] +
    " size=" +
    (files[i]).length() );
    }Edit 1:
    Also, in future, when posting code, code snippets, HTML/XML or input/output, please use the code tags to retain the indentation and formatting.   To do that, select the code and click the CODE button seen on the Plain Text tab of the message posting form.  It took me longer to clean up that code and turn it into an SSCCE, than it took to +solve the problem.+
    Edited by: AndrewThompson64 on Jul 21, 2009 8:47 AM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • How  to read all files  under a folder directory in FTP site

    Hi Experts,
    I use this SQL to read data from a file in FTP site. utl_file.fopen('ORALOAD', file_name,'r');
    But this need to fixed file name in a directory. However, client generate output file with auto finename.
    SO do we have any way to read all file by utl_file.fopen('ORALOAD', file_name,'r');
    We need to read all file info. because client claim for security issue and does not to overwirte output file name,
    we must find a way to read all file in output directory.
    Thanks for help!!!
    Jim

    If you use Chris Poole's XUTL_FTL package, I believe that contains functions that allows you to query the directory contents.
    http://www.chrispoole.co.uk/apps/xutlftp.htm
    Edited by: BluShadow on Jan 13, 2009 1:54 PM
    misread the original post

  • How to remove bad file?

    hi
    I am creating external table to import csv file into table...I put csv file in this directory(c:\temp1\hr.csv)...while importing, the bad file and text document are created..Actually the client does not require this....Can anyone say how to remove those files while importing?
    Fazila

    First of all bad file contains those record information which is rejected for any specific reason. So, you can get some valuable information regarding the rejected records. But, still if you don't want to keep it - then you can do it with a java based procedure. I don't thinki you can do it directly through any oracle procedure. Because, you are about to access the o/s system files. I don't think that can be done directly using Oracle Pl/SQL - which i'm not sure.
    Regards.
    Satyaki De.

  • How to create pdf files in UNIX directory from oracle reports

    I would like to know how to create pdf files in UNIX directory from oracle reports.
    Thanks,

    Please make your question more clear . Also mention the reports version.
    1) If you are runnning reports in Unix, you can give
    .... destype=file desformat=pdf desname=<filename>
    in command line
    Please refer docs below.
    2) If by your question you mean
    "My reports server is running in Windows but I want to ftp my files to Unix after creating it"
    then the answer is that you can use pluggable destination "ftp"
    .... destype=ftp desformat=pdf desname=<ftp url>
    Pluggable destinations download
    http://otn.oracle.com/products/reports/pluginxchange/index.html
    Thanks
    Ratheesh
    [    All Docs     ]
    http://otn.oracle.com/documentation/reports.html
    [     Publishing reports to web  - 10G  ]
    http://download.oracle.com/docs/html/B10314_01/toc.htm (html)
    http://download.oracle.com/docs/pdf/B10314_01.pdf (pdf)
    [   Building reports  - 10G ]
    http://download.oracle.com/docs/pdf/B10602_01.pdf (pdf)
    http://download.oracle.com/docs/html/B10602_01/toc.htm (html)
    [   Forms Reports Integration whitepaper  9i ]
    http://otn.oracle.com/products/forms/pdf/frm9isrw9i.pdf

  • How to delete all files and folders (with files) in IsolatedStorage.

    Hi awesome programmer:-) The code I have to clean up the local folder doesn't work properly so I won't even bother posting it here. I basically want to have a "master reset" option to remove all new created files and folder in the local folder.
    Can you give me simple code to remove all files/folder so the app goes back to the state it was when the user installed it for the first time? Thanks in advance. ps I were able to delete a directory(-ies) with this method:
    private async void DeleteDirectory(string directoryName)
    try
    var folder = await Windows.Storage.ApplicationData.Current.LocalFolder.GetFolderAsync(directoryName);
    if (folder != null)
    await folder.DeleteAsync();
    this.Dispatcher.BeginInvoke(delegate()
    txtUpdateFeed.Text = "Folder < " + directoryName + " > deleted.";
    catch (Exception ex)
    this.Dispatcher.BeginInvoke(delegate()
    txtUpdateFeed.Text = "Delete Directory << " + directoryName + " >> Error: " + ex.GetBaseException().Message.ToString();
    It seems to work, I have not tested with all conditions though. Anyway let me put up the code so you can see I have been trying: This is to delete everything but not all files are deleted:
    private void WipeAllData(bool bln)
    try
    txtUpdateFeed.Text = "Removing files...";
    if (bln)
    txtUpdateFeed.Text = "Removing folders...";
    //Delete videos directory
    DeleteDirectory("videos");
    //Delete pictures directory
    DeleteDirectory("pictures");
    txtUpdateFeed.Text = "Folders removed.";
    //Delete the rest of the files
    var iso = IsolatedStorageFile.GetUserStoreForApplication();
    foreach (string name in iso.GetFileNames())
    iso.DeleteFile(name);
    BtnWipeAllData.Content = "Wipe All Data";
    VideoCameraPowerValue = "on";
    BtnVideoCameraPower.Content = "Video Camera: ON";
    PhotoCameraPowerValue = "on";
    BtnPhotoCameraPower.Content = "Photo Camera: ON";
    txtUpdateFeed.Text = "Files removed successfully.";
    catch (Exception ex)
    MessageBox.Show("Wipe All Data Error:\n" + ex.Message.ToString());
    Why isn't all files being deleted?

    Hi Clint William Theron,
    Based on your descriptions, I know that when you run the above code, it does not delete all the files, then have you checked that which kinds of files or in which folder the files can not been deleted?
    Besides, if you want to let the app go back to the state it was when the user installed it for the first time, then an easy way is to uninstall and reinstall it.
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to Zip server files(in a directory) and throwing back to client

    Can someone tell me how to zip all the files in a particular directory of my web application and throwing back to client to give option for save that zipped file.
    i have used the below used function to zip in servlet. But I cann't zip a particular directory of my application in server.
    Please help
    private void zipDir(String dir2zip, ZipOutputStream zos)
    try
    //create a new File object based on the directory we
    // have to zip File
    File fileDir2Zip = new File(dir2zip);
    System.out.println("is directory ..."+fileDir2Zip.isDirectory());
    //get a listing of the directory content
    String[] dirList = fileDir2Zip.list();
    for(int i = 0 ; i < dirList.length ; i++)
    System.out.println("Dir list ..."+dirList);
    byte[] readBuffer = new byte[2156];
    int bytesIn = 0;
    //loop through dirList, and zip the files
    for(int i=0; i<dirList.length; i++)
    File f = new File(fileDir2Zip, dirList[i]);
    if(f.isDirectory())
    //if the File object is a directory, call this
    //function again to add its content recursively
    String filePath = f.getPath();
    zipDir(filePath, zos);
    //loop again
    continue;
    //if we reached here, the File object f was not
    //a directory
    //create a FileInputStream on top of f
    FileInputStream fis = new FileInputStream(f);
    //create a new zip entry
    ZipEntry anEntry = new ZipEntry(f.getPath());
    //place the zip entry in the ZipOutputStream object
    zos.putNextEntry(anEntry);
    //now write the content of the file to the ZipOutputStream
    while((bytesIn = fis.read(readBuffer)) != -1)
    zos.write(readBuffer, 0, bytesIn);
    System.out.println("Last");
    //close the Stream
    fis.close();
    catch(Exception e)
    e.printStackTrace();

    Hi
    Whatever file exist in directory should execute with out any condition because they delete all files after exection of my process chain. They are using another process chain once a day for deletion of all files in that directory.
    So directory always contains fresh files.
    Here by using routine in infopackge i am unable to run all files one by one at a time.
    As of my knowledge  by using infopackage we can run only one file at a time.
    Here my question is , can we run more than one file in single run of infopackage?
    or can we have any function module to run the infopackage from externally? so that i can use function module in abap program? any ideas..
    Regards
    Raju

  • How to duplicate a file in a directory to another directory?

    I am a student just has just learn some basic Java programming...May i know how to duplicate a file in a directory to another directory?
    How to start in doing this?
    Thank You

    I was suggesting to use java to send commands to the system shell so to speak....
    I don't know of a way to do this... under the File class you can delete files, but there is no provision to copy Files so to speak....
    one way would to be to open the file you want to copy with a file reader, and then write it all out to your new file.
    see http://java.sun.com/j2se/1.3/docs/api/java/io/FileReader.html for information of FileReaders

  • How to remove all transitions?

    I used the automate to sequence with default transition. A few dozens of transitions were added to the sequence.
    How to remove all the transitions without deleting the sequence and starting from scratch please?
    Thanks in advance.

    The difference in file size you are seeing is because you are only using motionless stills in your movies. No motion, and no effects. Some codecs allows for file size reduction by writing first and last frame information for a still, regardless of the length in the video sequence. Why the transition increases file size is because the codec actually has to write info for each frame in the length of the transition.
    This is not going to be the case with anybody working with actual video clips, or if someone adds motion to their stills. The codec then has to write information for every frame, resulting in a larger file size. For most projects, transitions will not make any significant change in file size.

  • How to remove all hyperlinks at once?

    Hi guys,
    I want to know how to remove all hyperlinks in a text at once. I know how to remove one link at a time. But it's time consuming if you paste a text with a lot of hyperlinks.
    Thanks,
    Adriano.

    Duplicate your document for safe then drag and drop the icon of the copy of the icon of this script saved as an application.
    --[SCRIPT remove links]{code}
    Enregistrer le script en tant qu'Application ou Progiciel : remove links.app
    Déposez le sur le bureau par exemple.
    Glisser-déposer l'icône d'un document Pages sur celle du script
    va éliminer tous les Hyperliens et signets prédsents dans le document.
    On peut également qlisser déposer un fichier index.xml.
    +++++++
    Save the script as an Application or an Application Bundle: remove links.app
    Store it on the desktop for instance.
    Drag and drop the icon of a Pages document on the script's icon
    to remove the Hyperlinks and Bookmarks embedded in the document.
    We may also drag & drop an index.xml file.
    Yvan KOENIG (Vallauris, FRANCE)
    16 février 2009
    enhanced 17 février 2009
    --=====
    property removeBookmarks : true
    true = remove the bookmarks
    false = don't remove the bookmarks *)
    property removeLinks : true
    true = remove the Links
    false = don't remove the Links *)
    property liste : {}
    --=====
    on open (sel)
    set theDoc to (item 1 of sel) as text
    tell application "System Events" to tell disk item theDoc
    set nn to name
    set uti to type identifier
    set isPackage to package folder
    end tell
    if nn is "index.xml" then
    my traiteIndex(theDoc)
    else if uti is not in {"com.apple.iwork.Pages.Pages", "com.apple.iwork.pages.sffpages"} then
    error "Not a Pages document !"
    else if isPackage then
    -- here the document is a package
    if theDoc ends with ":" then set theDoc to text 1 thru -2 of theDoc
    tell application "Finder"
    set the_index to (theDoc & ":index.xml")
    set indexGzAvailable to exists file (the_index & ".gz")
    set indexAvailable to exists file the_index
    end tell -- Finder
    if indexGzAvailable then
    if indexAvailable then tell application "Finder" to delete file the_index
    my expandIndex(the_index & ".gz")
    my traiteIndex(the_index)
    else
    if indexAvailable then
    my traiteIndex(the_index)
    else
    error "No Index available !"
    end if
    end if -- indexGzAvailable
    else
    -- here the document is a flat one
    tell application "Finder"
    set cont to (container of file theDoc) as text
    set name of file theDoc to (nn & ".zip")
    end tell -- Finder
    set theDocZ to cont & nn & ".zip"
    my expandDoc(theDocZ, theDoc)
    tell application "Finder"
    set name of file theDoc to (nn & "yk")
    set theDocF to cont & nn & "yk"
    set the_index to (theDocF & ":index.xml")
    set indexAvailable to exists file the_index
    end tell -- Finder
    if indexAvailable then my traiteIndex(the_index)
    end if -- nn …
    end open
    --=====
    on traiteIndex(theIndex)
    local theKey1, theKey2, theKey3, theKey4, theKey5, itm, itm1, itm2, itm2
    my nettoie()
    (* Lis le contenu du fichier Index.xml *)
    set texte to read file theIndex from 1
    if removeBookmarks then
    (* supprime les descripteurs de signets *)
    set theKey1 to "<sf:bookmark sf:name"
    set theKey2 to "</sf:bookmark>"
    if texte contains theKey1 then
    set my liste to my decoupe(texte, theKey1)
    repeat with i from 2 to count of my liste
    set itm to my decoupe(item i of my liste, theKey2)
    set itm1 to item 1 of itm
    set itm1 to text (1 + (offset of ">" in itm1)) thru -1 of itm1
    set itm2 to my recolle(items 2 thru -1 of itm, theKey2)
    set item i of my liste to (itm1 & itm2)
    end repeat -- i
    set texte to my recolle(my liste, "")
    end if
    end if -- removeBookmarks
    Here are samples of Hyperlinks in the index.xml file
    --link to bookmark
    <sf:p sf:style="paragraph-style-32">
    <sf:bookmark sf:name="page 3" sf:ranged="true" sf:page="3">
    page 3
    </sf:bookmark>
    <sf:br/>
    --link to URL
    <sf:p sf:style="paragraph-style-32">
    <sf:link href="http://discussions.apple.com/thread.jspa?threadID=1905618&amp;tstart=0" sf:style="SFWPCharacterStyle-7">
    <sf:span sf:style="SFWPCharacterStyle-7">
    Change cell color if number is different from previous cell
    </sf:span>
    </sf:link>
    <sf:br/>
    --link to an other Pages document
    <sf:p sf:style="paragraph-style-32">
    <sf:link href="pages:///Users/yvan_koenig/Documents/Sans%20titre%20-%20copie.pages#un%20 signet%20externe">
    <sf:file-alias sf:file-alias="0000000001ae000200010c4d6163696e746f7368204844000000000000000000 000000000000c45c8cef482b00000008a77c1853616e73207469747265202d20636f7069652e7061 67657300000000000000000000000000000000000000000000000000000000000000000000000000 000000360f06c5c03419000000000000000000010002000009200000000000000000000000000000 0009446f63756d656e747300001000080000c45c70cf0000001100080000c5c0260900000001000c 0008a77c0008a76f00006bdf000200414d6163696e746f73682048443a55736572733a7976616e5f 6b6f656e69673a446f63756d656e74733a53616e73207469747265202d20636f7069652e70616765 7300000e0032001800530061006e00730020007400690074007200650020002d00200063006f0070 00690065002e00700061006700650073000f001a000c004d006100630069006e0074006f00730068 0020004800440012003455736572732f7976616e5f6b6f656e69672f446f63756d656e74732f5361 6e73207469747265202d20636f7069652e7061676573001300012f00001500020012ffff0000"/>
    <sf:span sf:style="SFWPCharacterStyle-7">
    vers autre document
    </sf:span>
    </sf:link>
    <sf:br/>
    if removeLinks then
    (* supprime les descripteurs de liens *)
    set theKey1 to "<sf:link href="
    set theKey3 to "<sf:span sf:style="
    set theKey4 to "</sf:link>"
    set theKey5 to "</sf:span>"
    if texte contains theKey1 then
    set my liste to my decoupe(texte, theKey1)
    repeat with i from 2 to count of my liste
    set itm to my decoupe(item i of my liste, theKey4)
    set itm1 to item 2 of my decoupe(item 1 of itm, theKey3)
    set itm1 to text (1 + (offset of ">" in itm1)) thru -1 of itm1
    set itm1 to item 1 of my decoupe(itm1, theKey5)
    set itm2 to my recolle(items 2 thru -1 of itm, theKey4)
    set item i of my liste to (itm1 & itm2)
    end repeat -- i
    set texte to my recolle(my liste, "")
    end if -- texte contains
    This piece of code takes care of a bug in the save as Pages '08 process.
    A link to an other document is not completely disabled so the 'disabled' link remains blue.
    The link is stored this way:
    <sf:p sf:style="paragraph-style-32">
    <sf:span sf:style="SFWPCharacterStyle-7">vers autre document</sf:span>
    <sf:br/>
    when it would be:
    <sf:p sf:style="paragraph-style-32">
    vers autre document
    <sf:br/>
    if texte contains theKey3 then
    set my liste to my decoupe(texte, theKey3)
    repeat with i from 2 to count of my liste
    set itm to my decoupe(item i of my liste, theKey5)
    set itm1 to item 1 of itm
    set itm1 to text (1 + (offset of ">" in itm1)) thru -1 of itm1
    set itm2 to my recolle(items 2 thru -1 of itm, theKey5)
    set item i of my liste to (itm1 & itm2)
    end repeat -- i
    set texte to my recolle(my liste, "")
    end if -- texte contains
    end if -- removeLinks
    set lineFeed to ASCII character 10
    if texte contains (lineFeed & lineFeed) then set texte to my recolle(my decoupe(texte, lineFeed & lineFeed), lineFeed)
    if texte contains (return & return) then set texte to my recolle(my decoupe(texte, return & return), return)
    set eof of file theIndex to 0
    write texte to file theIndex
    my nettoie()
    end traiteIndex
    --=====
    on decoupe(t, d)
    local l
    set AppleScript's text item delimiters to d
    set l to text items of t
    set AppleScript's text item delimiters to ""
    return l
    end decoupe
    --=====
    on recolle(l, d)
    local t
    set AppleScript's text item delimiters to d
    set t to l as text
    set AppleScript's text item delimiters to ""
    return t
    end recolle
    --=====
    on nettoie()
    set liste to {}
    end nettoie
    --=====
    (* Expands the zip file z in the container d, z and d are pathnames as strings *)
    on expandDoc(z, d)
    do shell script "unzip " & quoted form of (POSIX path of (z)) & " -d " & quoted form of (POSIX path of (d))
    end expandDoc
    --=====
    on expandIndex(f)
    do shell script "gunzip " & quoted form of (POSIX path of (f))
    end expandIndex
    --=====
    on lisIndex_xml(f)
    local t
    try
    set t to ""
    set t to (read file f)
    end try
    return t
    end lisIndex_xml
    --=====
    on compactIndex(nDoc)
    local aliasNDoc
    set aliasNDoc to nDoc as alias
    write leTexte to aliasNDoc starting at 0
    do shell script "gzip " & quoted form of POSIX path of aliasNDoc
    end compactIndex
    --=====
    --[/SCRIPT](code}
    Yvan KOENIG (from FRANCE samedi 14 mars 2009 20:55:42)

Maybe you are looking for

  • Communication between a driver and application.

    Communication between a driver and application. I am writing a driver for a PCI card. I have found very good examples of how the driver should be build. Where do I find the information about how the user mode application should be talking the driver.

  • HT1339 HELP my ipod nano has completed frozen and won't do anything

    my ipod has complete frozen won't turn on or off and won't work charging by the mains or via the computer, i wanted to do a master reset but i can't even do this, please can anyone help

  • Approvals in OAFramework.

    Hi, I have a custom page which invokes a custom supervisor hierarchy workflow which has got many approvals.The number of approvals will change based on certain conditions. Everything is fine so far but i am unable to figure out a logic to display the

  • What is a error -5016

    What is a error -5016 on a Mac  version 2004

  • Transferring to a new ipad

    i have a lot of saved documents on my existing ipad and I want to buy a new one. Will all the documents I have saved on this ipad be transferred to the new ipad when I restore my last backup? thank you D