Jump to content

exit15

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

Everything posted by exit15

  1. Works perfectly... and I'm learning something too. thanks, exit15
  2. 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
  3. This one worked like a charm -- thanks (Fixing a small typo - ECHO OFF) @ECHO OFFSETLOCAL ENABLEEXTENSIONSDIR "%~1\*.*" /ogn /-p > "%~1\Listing.txt"notepad.exe /p "%~1\Listing.txt"exit15
  4. I stumbled upon this post after trying to follow the instructions on Microsoft Support site - http://support.microsoft.com/kb/321379. The context menu was added upon running the reg file and I could even see the directory content in a notepad document for 2 seconds before it disappeared like a snapchat. The alternate bat file code offered here by CharlotteTheHarlot worked well. Thanks much! If someone can improve and save the txt file inside the same directory we are printing with this bat file, it will save future ‘where was this file saved to’ and it will not cause any problems of overwriting the same file when trying to print the content of multiple directories. exit15
×
×
  • Create New...