Shuffling the .XnViewSort file
Moderators: helmut, XnTriq, xnview
Shuffling the .XnViewSort file
Can anyone recommend a text tool to shuffle the filenames in the 'sort' file?
Re: Shuffling the .XnViewSort file
Hi Marsh...
Here is one. It is a command-line utility to sort text files.
It will optionally skip the header-line (required for .XnSortFile), sort on any substring, etc.
Here is one. It is a command-line utility to sort text files.
It will optionally skip the header-line (required for .XnSortFile), sort on any substring, etc.
John
Re: Shuffling the .XnViewSort file
Thanks. To complement ordering, I discovered a Linux program called shuf (which was already built into OS) to create a random listing. I'm launching the following script from my file manager. After refresh, the new arrangement appears.
Code: Select all
#!/bin/sh
#
# Randomize .XnViewSort file and add header
#
for i in "$*"; do
shuf "$i" -o "$i"
grep -v -E 'XnView sort' "$i" >xnfilenames.txt
echo "XnView sort" > xntemp.txt
cat xnfilenames.txt >> xntemp.txt
cp xntemp.txt "$i"
done
Re: Shuffling the .XnViewSort file
Some win32 versions of linux utilities are available here.
This playlistmixer.bat works with emulator... don't know about actual OS.
Programs used:
grep.exe, sort-7.6.exe, cat.exe
Requirements:
libiconv2.dll, libintl3.dll, msvcp60.dll, pcre3.dll, regex2.dll
Thoughts about MP:
These examples might help determine the usefulness of scrambling order before vs. after switching to the "custom" sort.
This playlistmixer.bat works with emulator... don't know about actual OS.
Code: Select all
grep -v -E "XnView sort" .XnViewSort >filenames.tmp
sort-7.6.exe -R -o scrambled.tmp filenames.tmp
echo XnView sort >header.tmp
cat scrambled.tmp >> header.tmp
copy header.tmp .XnViewSort
rem del *.tmp
grep.exe, sort-7.6.exe, cat.exe
Requirements:
libiconv2.dll, libintl3.dll, msvcp60.dll, pcre3.dll, regex2.dll
Thoughts about MP:
These examples might help determine the usefulness of scrambling order before vs. after switching to the "custom" sort.