Back in the early days of Windows XP, I came across this really neat batch file that allowed users to export selected directory/folder contents listing to a txt file from Windows Explorer right-click context menu.
For example:
Say you wanted to export a list of files contained within a folder, you would open Windows Explorer, select the folder which contents you wish to be exported, right click to display context menu and select "Export Directory Listing", the batch file would
then create a "Directory-Listing.txt" export text file inside selected folder, really neat tool!
The problem is I can't get the batch file to work on Windows 8.1., it keeps displaying "CMD does not support UNC paths as current directories."
Here is the original article:
"Generate a File Listing from a Windows Explorer Context Menu"
Here is my modified version which worked well in XP:
<code>
@echo off
title Export Folder Listing, Version 2.0, 2014/04/08
echo.
echo Right-click on any folder in MS Windows Explorer and select
echo "Export Folder Listing" from Shortcut Menu to export it's contents
echo to: "[Selected Folder]/Export-Folder-Listing.txt".
echo.
echo.
echo Exporting: "[Selected Folder]/Export-Directory-Listing.txt"
cd %1
dir /a /b /-p /o:gen >"%temp%\Export-Directory-Listing.txt"
echo.
echo Exporting FINISHED!
echo.
echo.
echo NOTES:
echo.
echo This batch program is located in C:\Windows folder
echo (Export-Folder-Listing.bat).
copy "%temp%\Export-Directory-Listing.txt" %1 >null
del "%temp%\Export-Directory-Listing.txt" >null
echo.
echo.
echo.
PAUSE
exit
</code>
Any ideas on how to get it to work on Windows 8.1?