Hybris call path of media - media

I want to call path of picture with impex script.
I've this path C:%PATH%\hybris\bin\custom\yb2bacceleratorstorefront\web\webroot_ui\responsive\common\images\img_KE185.
How can i call it in #media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator]?
Thank you for helping

You can give path similar like below:
INSERT_UPDATE Media;#media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator];...
; jar:com.yourdomain.YourClass&/www/responsive/common/images/img_KE185 ;...

Related

How to store file with an absolute path?

How can I store a file with the absolute path /var/www/cityscape/public/storage/img/newyork.jpg?
I tried Storage::put() (https://laravel.com/docs/5.3/filesystem#storing-files), but this method seems to only accept relative paths.
If the path you've specified in your question is in the same system as your app you can use File instead:
File::put('/var/www/cityscape/public/storage/img/newyork.jpg', $theFile);
Hope this helps!

Dealing with ini Files - Add Enivornment Variable

i am trying to add an evironment variable to a path inside an ini file, the variable is the current username in Windows which can be accessed via %username%.
so i would like to do path = c:\users\[username variable]\ ...
Will appreciate anyhelp
Use ExpandEnvironmentStrings().
See WritePrivateProfileString() and friends...

extra backslash in the installation path

I am using VS installer to create an installer for my application. I have a custom action which will pass the installation path to the code behind like the following : /path="[TARGETDIR]\" .
Inside my installer Class I am displaying the installation path in the Install() method as path = Context.Parameters["path"]; MessageBox.Show(pathh);
however, what is displayed is something like this:c:\Program Files(x86)\Manufacturer\Applicationname\\
So I don’t know how this extra backslash is added and do not know how to remove it . Any idea?
it is worth mentioning that i was able to creat a file in the installtion path using "pathh"
If you are just want to display the path to the user u can use the following simple trick which works fine in your case: string path = pathh.Remove(pathh.Length-1); MessageBox.Show(path); Hope it helps.
Have you tried making your custom action without the trailing backslash?
Replace
/path="[TARGETDIR]\"
with
/path="[TARGETDIR]"

How do I get the directory where the executable is located?

I got the filename like this:
_TCHAR filename[_MAX_PATH];
GetModuleFileName(NULL,filename,sizeof(filename));
How do I remove the filename from this full path? Should I use regex?
You can use the Windows shell API function PathRemoveFileSpec to do this. Example usage is listed on the linked page.
Since you use VS++, you can use:
_splitpath and _wsplitpath functions to break apart path

How to use wildcard in Windows command-line?

I some animations, they are like this:
/OP/
/OP/OP1/
/OP/OP1/OP1.rmvb
/OP/OP2/
/OP/OP2/OP2.rmvb
/OP/OP3/
/OP/OP3/OP3.rmvb
/OP/OP4/
/OP/OP4/OP4.rmvb
...and more
I want to make it like
/OP/
/OP/OP1.rmvb
/OP/OP2.rmvb
/OP/OP3.rmvb
/OP/OP4.rmvb
I tried
move \OP\*\*.rmvb \OP
It gave me error says
The file name, directory name, or volume label syntax is incorrect.
I also tried
dir \OP\*
This shows all the folders
But if I try
dir \OP**
It gave me the same error.
Could anyone please help me?? Thank you very much
Is that a programming question? Requiring to do this on the command line?
Otherwise, I would just do a Windows Search *.rmvb, and drag'n'drop the result to the folder of your choice...

Resources