Import multiple resources from a file and folder structure
757
Views
19
Comments
New
Service Studio

It would be interesting to allow the importation of several files and folders, suggesting as Target Directory the very structure indicated in the import.


importdirectorystructure.png

That's already possible, though EXTREMELY hidden... from a command line, run Service Studio with the switch /? (I think? maybe /help), it will give you a list of command line switches, one of them is to import resources from a directory structure.

J.Ja

These are de command line options and I have already tried "importResource" but only with individual files. I think it is not possible with a directory structure.


[<eSpace.oml>]

-buildNative <applicationKey> <applicationName> <hostName>

-cleanup <eSpace.oml> <output_file> [<productKey>]

-create NewApplication|NewMobileApplication|<templateKey> [-url <hostName>] [-userName <userName>] [-password|-encryptedPassword <password>]

-d <localESpace.oml> <foreignESpace.oml> <diffTextFile.txt>

-demoMode [<eSpace.oml>] [<hostName> <userName> <password>]

-diff <localESpace.oml> <foreignESpace.oml>

-downloadAndOpen -eSpaceKey <eSpaceKey> [-elementKey <elementKey>] [-url <hostName>] [-userName <userName>] [-password|-encryptedPassword <password>]

-export <eSpace.oml> <directory> xls|xlsx|resX [<output>]

-exportSettings settings.xml

-import <eSpace.oml> <resources.xls>|<resources.xlsx>|<resources.resX> [<output>]

-importResource <eSpace.oml> <resource file> [-override] [-deployAction ignore|copy] [<target directory>]

-importSettings settings.xml

-merge <localESpace.oml> <foreignESpace.oml> [ <baseESpace.oml> ]

-mergeModules <PlatformServicesHost> <Authtoken> <LocalEnvironmentHostname> <LocalModuleVersionId> <LocalEnvironmentId> <ForeignEnvironmentHostname> <ForeignModuleVersionId> <ForeignEnvironmentId> <LocalEnvironmentName> <ForeignEnvironmentName> <BaseModuleVersionId>

-openApp <appId> <appName> <packageUrl>

-openFromUrl (<.osp url> <eSpaceName> -connect) <hostName> <userName> <password>

-openModuleFromUrl (<url.oml>)|(<url>)|(<url?resourcename=.oml>)

-recover <espace.oml> [<lastSavePath>]

-refresh <eSpace.oml> <verify.xml> <hostName> <userName> <password> [<productKey>]

-removeChangeTracking <eSpace.oml> [<productKey>]

-resetSettings

-runTests <eSpace.oml>|<eSpaceKey> <output.xml> <hostName> <userName> <password> <tests>

-sd <localESpace.oml> <foreignESpace.oml> <diffTextFile.txt>

-showApp <applicationKey> <applicationName> <hostName>

-silentrecover <espace.oml> [<savePath>]

-structuralDiff <localESpace.oml> <foreignESpace.oml>

-structuralMerge <localESpace.oml> <foreignESpace.oml> [ <baseESpace.oml> ]

-u <eSpace.oml> [<verify.xml>] [-connectToServer <hostName> <userName> <password>] [<staticEntities.xml>] [<productKey>] [<serverDatabaseProvider>] [<externalDatabaseProviderKeys.xml>]

-uu <eSpace.oml> [-connectToServer <hostName> <userName> <password>] [<productKey>] [<serverDatabaseProvider>] [<externalDatabaseProviderKeys.xml>]

Yes, so you write a shell script in powershell/CMD/BAT format (whatever you like) to walk the tree and run that command on each file, if needed. Not ideal, but have you *tried* a folder through the command line? I know when CK Editor last got updated it was through the command line and automated somehow.

J.Ja

I've made exactly that: write a shell script in powershell/CMD/BAT.

(ServiceStudio.exe should be executed for each resource on that script).

By the way, I was just installing CKEditor with some plugins.
The plugin that forced me to write a script was FMathEditor, but after its completion, my module was over 40M. After that I gave up and ended up looking for lighter ones.


Thanks anyway!!!

Merged this idea with 'Import multiple resource files at once' (created on 20 Oct 2019 15:51:14 by Eduardo Jauch)

When we need to import more than one Resource file into a module, we have to do it one by one. Would be very nice if we could select multiple files and import all of them at once.



This comment was:
- originally posted on idea 'Import multiple resource files at once' (created on 20 Oct 2019 by Eduardo Jauch)
- merged to idea 'Import multiple resources from a file and folder structure' on 22 Oct 2019 03:01:51 by Justin James
2021-04-27 10-08-39
Daniel Marques
Changed the category to
Service Studio

Nice to have this feature.

Merged this idea with 'Add multiple files to resource' (created on 29 Nov 2019 04:18:21 by Nikhil Gaur)

I want to add multiple files like 40 images or 10 fonts to the resource folder in one go. RIght now Service Studio only allows to add one file at a time which means I have to do the same step 50 times to add all my files.

So there should be an option in Service Studio to add multiple images in one go or some import option.



This comment was:
- originally posted on idea 'Add multiple files to resource' (created on 29 Nov 2019 by Nikhil Gaur)
- merged to idea 'Import multiple resources from a file and folder structure' on 30 Nov 2019 18:30:33 by Justin James

There is a command line option to do this. Run Service Studio from command line with /? or -? I think to see the options list. From there it's a simple exercise to write a batch file, shell script, powershell, etc. to do this. Is it ideal? NO. Does it work? Yes.

J.Ja



This comment was:
- originally posted on idea 'Add multiple files to resource' (created on 29 Nov 2019 by Nikhil Gaur)
- merged to idea 'Import multiple resources from a file and folder structure' on 30 Nov 2019 18:30:33 by Justin James
Merged this idea with 'Add multiple files in resources inside a folder' (created on 03 Dec 2019 12:49:05 by Nikhil Gaur)

I know we can add multiple files in resource folder by drag and drop but if I create folder inside resource folder and try to drop multiple file in it then it doesn't work.

There is an alternative available that drop all files in resource folder and then move them (using drag and drop) to another folder inside resource folder.

I think this should be submitted as bug but there is no section to submit bug so I am adding this as an idea.

Changed the category to
Service Studio

I came on here to suggest the same thing!

You should be able to bulk import resources into any folder not just the root folder and then have to move them. This is a massive pain when you have loads of files in the root folder and they have similar names to some of the files you're importing. It negates the usefulness of the bulk import.

....though as a workaround you can create a temporary folder, move all the files into a temporary folder, do a bulk import into the root folder, move those to the desired subfolder(s), then move any resources that were originally in the root folder from the temporary folder back into the root folder, and then delete the temporary folder.

But this is an unnecessary hack and I agree, this feels like a bug.

Merged this idea with 'Import/Paste multiple files together in Resources folder' (created on 18 May 2023 06:36:55 by Mayank Dharmpurikar)

Multiple files cannot currently be imported or pasted together in the Resources (Under Data tab) folder.

I'm currently working on a project that requires me to add more plugins in my CKEditor module's library. Most CKEditor plugins feature a lang folder that comprises more than 70 files, making it difficult to import each one one at a time.

I believe that service studio should have the ability to import or paste numerous files into the Resources folder.

Hi,

I am going to merge this idea as it already exists.

Still worthwhile reading the workaround suggested by Justin James, on this idea:
https://www.outsystems.com/ideas/7359/import-multiple-resources-from-a-file-and-folder-structure/