Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Anyone got the recipe for extracting files from a zip-file (stored in a container field, though that's probably irrelevant since I can export it) to a specified location? I need it to work on Windows XP and Vista.

  • 3 weeks later...

Maybe, it will help...

On extracting files, it will not retain the subfolders tree.

It will also create a temporary folder to extract the files.

If you want other ideas: Java Examples

int unZipPhoto(String filePath, String tempPath, String tempFolderName){

	

	try{

		//Créer folder temp

		new File(tempPath + tempFolderName).mkdir();

	

		String pattern2="^.*/(.*..*)$";

		Pattern patternObj = Pattern.compile(pattern2);

		Matcher matcherObj;

		

		ZipFile zf = new ZipFile(filePath);

		Enumeration e = zf.entries();

		while (e.hasMoreElements()) {

			ZipEntry ze = (ZipEntry) e.nextElement();

		

			if (ze.getName().substring(1,2) != "_"){//Ne pas prendre les ressources

				if (ze.getName().matches(pattern2)){ //Vérifier présence d'un sous-dossier

		

					matcherObj = patternObj.matcher(ze.getName());

					matcherObj.find();   

					entryFilename = matcherObj.group(1);  

					

				}else{

					entryFilename=ze.getName();

				}

		

				FileOutputStream fout = new FileOutputStream(tempPath + tempFolderName + "/" + entryFilename);

				InputStream in1 = zf.getInputStream(ze);

				for (int c = in1.read(); c != -1; c = in1.read()) {

					fout.write©;

				}

				in1.close();

				fout.close();

			}

		}

	

		return 1;

	

	}catch (Exception e){

		return 0;

	}



}

  • 4 weeks later...
  • Author

On extracting files, it will not retain the subfolders tree.

In my case, I absolutely need to preserve the full file and folder hierarchy. I've looked at various other solutions for unzipping files, and various failed for the same reason...

I can do this very nicely with PHP, so it looks like I'm going to have to get the SmartPill plug-in for this; not a big deal, but it really feels like overkill for what I'm trying to achieve (and I need this to work without an internet connection).

I'm pretty sure there is something to do to preserve the hierarchy in my script.

Also, have you looked the dacon's FileFire plugin?

http://www.dacons.net/fmplugins/filefireadvanced/

  • Author

I'm certain it can be done in Java - I just don't have the time to do enough trial-and-error to get this working (my knowledge of java is very limited).

The Dacons plug-in does however look very promising - I actually hadn't heard of it. The Medium developer license isn't that expensive, considering the time I'd spend to get something else working. Will have to test it a bit more - my first attempt on a Mac worked fine except that I get an unwanted "_MACOSX" folder...

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.