Customized columns

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Calade
Posts: 39
Joined: 02 Nov 2014 13:20

Customized columns

Post by Calade »

Hi all,

One rare good thing in the native Windows explorer is customized folder.

I mean, for exemple, add a column "Dimensions" for a folder but not others. Same thing for the type of view (view thumbs for a folder but not others).
Of course I mean set the view/columns manually folder by folder.

Thanks for your answer.

Calade

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customed Folder

Post by highend »

Hey,

and you get the same possibilities with XY.

You just need to use the menu - View - Folder View Settings options (e.g. Save). Don't forget to save your settings after you've saved view settings for specific folders.
One of my scripts helped you out? Please donate via Paypal

Calade
Posts: 39
Joined: 02 Nov 2014 13:20

Re: Customed Folder

Post by Calade »

Thanks, it's exactly what I was looking for.

By the way, do you know how display the lenght of a video (not the file length by itself).

Calade

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customed Folder

Post by highend »

View - Columns - New Column

Right click the newly created column "New"
-> Select property

Nr. 27 should be called "Video length" or "Length". Select it, click "OK"

Not all video file types support this property. If this isn't enough you'd need to create a custom column with a script that uses e.g. ffmpeg / mediainfo to get the length of a video file but you should be careful, this could be a slow process...
One of my scripts helped you out? Please donate via Paypal

Calade
Posts: 39
Joined: 02 Nov 2014 13:20

Re: Customed Folder

Post by Calade »

Thanks again, it works fine for AVI video.
As numbers are MP4 video, I'll try with the second solution you've given.

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customed Folder

Post by highend »

To get it for all videos:

- Download MediaInfo (http://mediaarea.net/de/MediaInfo/Download/Windows)
- Choose the CLI version (32bit works also on x64 bit machines)
- Extract that .zip archive and remember the path for that folder

XY side:
View - Colums - New Column
Right click the "New" column -> Configure Custom Columns...

Click on a free entry (e.g. the first with the name "(Undefined)"), click "Edit..."

Caption: Video length
Type: Script
Script content box:

Code: Select all

 $mediaInfo = "D:\Users\Highend\Downloads\MediaInfo_CLI_0.7.70_Windows_i386\MediaInfo.exe";
 $length = regexreplace(runret("$mediaInfo --Inform=General;%Duration/String3% ""<cc_item>"""), "\.\d*\r?\n");
 return $length;
Format: Text
Trigger: Browse
Item type: Files
Maybe you should use the filter as well (if you have more non video files in those folders). E.g.: avi;mkv;mp4
Ofc you can enter additional extensions (separated by ;) as well

Regarding the script content box:
1. Replace the path to your MediaInfo.exe file with the one on your system
2. Make sure all three lines are indented with at least one space

Click "OK".

The <xx> entry should look like this now: Video length; Script (avi;mkv;mp4)

Click "OK".

Now right click the "New" column again -> Select Custom Column...

Choose the newly created entry, click "OK".

Now you should see the correct video length for all file types that you entered for that custom column...
One of my scripts helped you out? Please donate via Paypal

Calade
Posts: 39
Joined: 02 Nov 2014 13:20

Re: Customed Folder

Post by Calade »

Thanks very luch. I'll try that tomorrow and I get you rid of the results.

Thans again.

Calade

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customed Folder

Post by highend »

A slightly changed script for a prettier output (changed in the last post as well):

Code: Select all

 $mediaInfo = "D:\Users\Highend\Downloads\MediaInfo_CLI_0.7.70_Windows_i386\MediaInfo.exe";
 $length = regexreplace(runret("$mediaInfo --Inform=General;%Duration/String3% ""<cc_item>"""), "\.\d*\r?\n");
 return $length;
One of my scripts helped you out? Please donate via Paypal

Calade
Posts: 39
Joined: 02 Nov 2014 13:20

Re: Customized folders

Post by Calade »

Thanks very mich for all thse stuff.
It works fine.

Thanls again
Calade

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Customed Folder

Post by yusef88 »

highend wrote:A slightly changed script for a prettier output (changed in the last post as well):

Code: Select all

 $mediaInfo = "D:\Users\Highend\Downloads\MediaInfo_CLI_0.7.70_Windows_i386\MediaInfo.exe";
 $length = regexreplace(runret("$mediaInfo --Inform=General;%Duration/String3% ""<cc_item>"""), "\.\d*\r?\n");
 return $length;
Hi highend
it doesn't work for me
Attachments
2014-11-04_182343.png
2014-11-04_182343.png (35.28 KiB) Viewed 4652 times

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customized columns

Post by highend »

Show me the exact script that you've used and a screenshot of the path and content of the MediaInfo folder...
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Customized columns

Post by yusef88 »

Code: Select all

 $mediaInfo = "%programfiles%\K-Lite Codec Pack\Tools\mediainfo.exe";
 $length = regexreplace(runret("$mediaInfo --Inform=General;%Duration/String3% ""<cc_item>"""), "\.\d*\r?\n");
 return $length;
the trigger is : Browse and still not working
Attachments
2.png
2.png (3.86 KiB) Viewed 4643 times
2014-11-04_184406.png
2014-11-04_184406.png (19.34 KiB) Viewed 4643 times

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customized columns

Post by highend »

And the mediainfo.exe is REALLY the version from the CLI package?
One of my scripts helped you out? Please donate via Paypal

yusef88
Posts: 1148
Joined: 28 Jan 2013 03:50
Location: Windows 8.1 32-bit

Re: Customized columns

Post by yusef88 »

actually no :) it's a part of K-Lite Codec Pack; I thought it doesn't matter because they're same version v0.7.70..so I'll try yours.

highend
Posts: 14578
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: Customized columns

Post by highend »

- Download MediaInfo (http://mediaarea.net/de/MediaInfo/Download/Windows)
- Choose the CLI version (32bit works also on x64 bit machines)
- Extract that .zip archive and remember the path for that folder
^^
One of my scripts helped you out? Please donate via Paypal

Post Reply