OMG, I went back to the office today and the printer started shooting all of my Listing.txt files from yesterday. What a waste. I did not mean for it to actually print, I just wanted to create the text file with the list of the files within the selected directory so that I can later manipulate in excel or access. So here's the code: what it currently does is to create a txt file within the selected directory, this file Listing.txt has the names of all the files contained in that directory; it then sends this file to the printer. I want to stop sending the file to the printer. – help me save some trees. Printdir.dat @ECHO OFFSETLOCAL ENABLEEXTENSIONSDIR "%~1\*.*" /ogn /-p > "%~1\Listing.txt"notepad.exe /p "%~1\Listing.txt"PrintDirectoryListing.reg Windows Registry Editor Version 5.00[HKEY_CLASSES_ROOT\Directory\Shell]@="none"[HKEY_CLASSES_ROOT\Directory\Shell\Print_Directory_Listing]@="Print Directory Listing"[HKEY_CLASSES_ROOT\Directory\shell\Print_Directory_Listing\command]@="Printdir.bat \"%1\""[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory]"BrowserFlags"=dword:00000008[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory\shell\Print_Directory_Listing]@="Print Directory Listing"[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory\shell\Print_Directory_Listing\command]@="Printdir.bat \"%1\""[HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}]@=""[HKEY_CLASSES_ROOT\SOFTWARE\Classes\Directory]"EditFlags"="000001d2"exit15