Jump to content

ericire

Members
  • Content Count

    47
  • Joined

  • Last visited

Community Reputation

0 Neutral

About ericire

  • Rank
    novice
  • Birthday 12/21/1962

Profile Information

  • Gender
    Not Telling
  1. with filemaker 10 pro advanced I have a calculated multivalued that displays linked images. I checked "keep the proportions" and reduce the image. On screen in preview mode everything is ok ... ... but in print the picture is cropped what can I do?
  2. hello every body as I said before _Dir is the function argument with this folder path and that's whole of the code wich is in the original scriptmaster file, for the development of the script. what is curious is that now this java.io.FileNotFoundException error no longer occurs, while I carried the memory of scriptmaster to 1800 ( with 2048 Filemaker is unbootable ) and resulting in the wheel and filemaker not responding indefinitely. otherwise, this code works fine for small folders. So conclusion, for large directories, I give scriptmaster, because with my VBScript script, it makes the list easy in 2 minutes with this 13,9 Go and 117896 files and folders.
  3. the script is def list = [] def dir = new File(_DIR) dir.eachFileRecurse {file -> if ( file.isFile()) { list << file } } list and _DIR is ‪C:\Program Files (x86) and error is java.io.FileNotFoundException: C:\Program Files (x86)\SideSlide\‪C:\Program Files (x86)
  4. yes thank you, as mentioned in the first post, I had already increased this memory when one second error occurred "java.io.FileNotFoundException error" on which scriptmaster was blocked. Any other script ended on the same error.
  5. good that's unlocked after several restarts it worried me
  6. Hi I had a heap error in trying to list a voluminous folder, so I increased the memory as shown in the ProgramData folder. I redo an attempt and I have a java.io.FileNotFoundException error :, and since, all the scripts I use, the result is exactly the same error. Scriptmaster is stuck on this error. What can I do please ?
  7. hello let's go with // ZipDir ( fm_dirIn ; fm_fileOut ; fm_delete ) // 10_12_23_JR WORKING & 2015_09_19_E PLASSOT // v2.0 // adds all of tree from starting directory to zip file // adapted from Solomon Duskis, http://www.jroller.com // without diacriticals chars (accents) in path name //bugs corrected to include the original folder and close the inputstream //added option to delete the original folder : if you want put yes in fm_delete and if not put no import java.io.File import java.io.FileInputStream import java.io.FileOutputStream import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream try { topDir = new File(fm_dirIn) ZipOutputStream zipOut = new ZipOutputStream ( new FileOutputStream(fm_fileOut) ); topDirLength = topDir.parent.length()+1 new File(fm_dirIn).eachFileRecurse (){ file -> relPath = file.absolutePath.substring(topDirLength).replace('\\', '/') if ( file.isDirectory() && !relPath.endsWith('/')){ relPath += "/" } entry = new ZipEntry(relPath) entry.time = file.lastModified() zipOut.putNextEntry(entry) if( file.isFile() ){ zipOutN = new FileInputStream(file) zipOut << zipOutN zipOutN.close() } } zipOut.close() if (!new File(fm_fileOut).exists()) {return 'ERROR'} else if (fm_delete == 'yes') { topDir.deleteDir() } else if (fm_delete == 'no') { return true } } catch (Exception e) { return 'ERROR ' + e.getMessage() //e.printStackTrace() }
  8. With a lot of perseverance I finally managed and replace to have parent dir topDirLength = topDir.parent.length()+1 I soon put the whole code with possible deletion
  9. Hi it is the new FileInputStream (file) which was to be closed so I create a new var zipOutN and closed it Now, as i said, this zip is invalid because the first folder have'nt any name. It's name must be the same as the folder to be zip, fm_dirIn and i search how to do that. Do you know ? // ZipDir ( fm_dirIn ; fm_fileOut ) // 10_12_23_JR WORKING // v1.0 // adds all of tree from starting directory to zip file // adapted from Solomon Duskis, http://www.jroller.com // without diacriticals chars (accents) in path name import java.io.File import java.io.FileInputStream import java.io.FileOutputStream import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream try { topDir = new File(fm_dirIn) zipOut = new ZipOutputStream ( new FileOutputStream(fm_fileOut) ); topDirLength = topDir.absolutePath.length() topDir.eachFileRecurse{ file -> relPath = file.absolutePath.substring(topDirLength).replace('\\', '/') if ( file.isDirectory() && !relPath.endsWith('/')){ relPath += "/" } entry = new ZipEntry(relPath) entry.time = file.lastModified() zipOut.putNextEntry(entry) if( file.isFile() ){ zipOutN = new FileInputStream(file) zipOut << zipOutN zipOutN.close() } } zipOut.close() } catch (Exception e) { return 'ERROR ' + e.getMessage() //e.printStackTrace() } if (!new File(fm_fileOut).exists()){return 'ERROR'} return true
  10. Thanks John I understood the principle zipOut.closeEntry() did not work but entry.close () yes best regards
  11. actually when I try to unzip the file with windows, it tells me that the file is invalid: it lacks the name of the original folder (the first level of the tree is empty). But I can unzip it with 7zip
  12. Hi I use this groovy script made by john renfrew ( Thank's ) to zip a folder. It works fine, but the original folder is locked by filemaker and i can't delete it. I try IsGui=False or not What can I do ? // ZipDir ( fm_dirIn ; fm_fileOut ) // 10_12_23_JR WORKING // v1.0 // adds all of tree from starting directory to zip file // adapted from Solomon Duskis, http://www.jroller.com import java.io.File import java.io.FileInputStream import java.io.FileOutputStream import java.util.zip.ZipEntry import java.util.zip.ZipOutputStream try { topDir = new File(fm_dirIn) zipOut = new ZipOutputStream ( new FileOutputStream(fm_fileOut) ); topDirLength = topDir.absolutePath.length() topDir.eachFileRecurse{ file -> relPath = file.absolutePath.substring(topDirLength).replace('\\', '/') if ( file.isDirectory() && !relPath.endsWith('/')){ relPath += "/" } entry = new ZipEntry(relPath) entry.time = file.lastModified() zipOut.putNextEntry(entry) if( file.isFile() ){ zipOut << new FileInputStream(file) } } zipOut.close() } catch (Exception e) { e.printStackTrace() } return true
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.