Solved printing dir of specific folder


TryingHard

Member
Member
Local time
4:51 AM
Posts
95
OS
Windows 11 home version 10.0.22631 Build 22631
This must be simple but I cannot figure out what I am doing wrong.
Windows 11 Pro
I want a dir of D:\My Images

I open a command prompt. It opens as
C:\Users\my username>

I type dir /a /s /b /tc /ta /tw > D:\filelist.txt
and get (naturally) the dir of
C:\Users\my username>

So I type CD D:\My Images
but remain in C:\Users\my username>
and the dir command gives me the content of C:\Users\my username>

I try
dir D:\My Images /a /s /b /tc /ta /tw > D:\filelist.txt
and get File not found.

What am I doing wrong?

Thank you.
 

My Computer

System One

  • OS
    Windows 11 home version 10.0.22631 Build 22631
    Computer type
    Laptop
    Manufacturer/Model
    Asus/zenbook 14 UX34055MA Q425MA
    CPU
    Intel 7 ultra 155H, 3800 Mhz, 16 Cores, 22 logical proc
    Motherboard
    ASUTEK
    Memory
    16
    Hard Drives
    1TB

My Computers

System One System Two

  • OS
    Win 11 Home ♦♦♦26100.3037 ♦♦♦♦♦♦♦24H2 ♦♦♦non-Insider
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® [May 2020]
    CPU
    AMD Ryzen 7 3700X
    Motherboard
    Asus Pro WS X570-ACE (BIOS 4702)
    Memory
    G.Skill (F4-3200C14D-16GTZKW)
    Graphics Card(s)
    EVGA RTX 2070 (08G-P4-2171-KR)
    Sound Card
    Realtek ALC1220P / ALC S1220A
    Monitor(s) Displays
    Dell U3011 30"
    Screen Resolution
    2560 x 1600
    Hard Drives
    2x Samsung 860 EVO 500GB,
    WD 4TB Black FZBX - SATA III,
    WD 8TB Black FZBX - SATA III,
    DRW-24B1ST CD/DVD Burner
    PSU
    PC Power & Cooling 750W Quad EPS12V
    Case
    Cooler Master ATCS 840 Tower
    Cooling
    CM Hyper 212 EVO (push/pull)
    Keyboard
    Ducky DK9008 Shine II Blue LED
    Mouse
    Logitech Optical M-100
    Internet Speed
    300/300
    Browser
    Firefox (latest)
    Antivirus
    Bitdefender Internet Security
    Other Info
    Speakers: Klipsch Pro Media 2.1
  • Operating System
    Windows XP Pro 32bit w/SP3
    Computer type
    PC/Desktop
    Manufacturer/Model
    Built by Ghot® (not in use)
    CPU
    AMD Athlon 64 X2 5000+ (OC'd @ 3.2Ghz)
    Motherboard
    ASUS M2N32-SLI Deluxe Wireless Edition
    Memory
    TWIN2X2048-6400C4DHX (2 x 1GB, DDR2 800)
    Graphics card(s)
    EVGA 256-P2-N758-TR GeForce 8600GT SSC
    Sound Card
    Onboard
    Monitor(s) Displays
    ViewSonic G90FB Black 19" Professional (CRT)
    Screen Resolution
    up to 2048 x 1536
    Hard Drives
    WD 36GB 10,000rpm Raptor SATA
    Seagate 80GB 7200rpm SATA
    Lite-On LTR-52246S CD/RW
    Lite-On LH-18A1P CD/DVD Burner
    PSU
    PC Power & Cooling Silencer 750 Quad EPS12V
    Case
    Generic Beige case, 80mm fans
    Cooling
    ZALMAN 9500A 92mm CPU Cooler
    Mouse
    Logitech Optical M-BT96a
    Keyboard
    Logitech Classic Keybooard 200
    Internet Speed
    300/300
    Browser
    Firefox 3.x ??
    Antivirus
    Symantec (Norton)
    Other Info
    Still assembled, still runs. Haven't turned it on for 13 years?
You need quotes around the folder path, since it has a space in it.

dir "D:\My Images" /a /s /b /tc /ta /tw > D:\filelist.txt
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 24H2
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC12WSHi7
    CPU
    12th Gen Intel Core i7-1260P, 2100 MHz
    Motherboard
    NUC12WSBi7
    Memory
    64 GB
    Graphics Card(s)
    Intel Iris Xe
    Sound Card
    built-in Realtek HD audio
    Monitor(s) Displays
    Dell U3219Q
    Screen Resolution
    3840x2160 @ 60Hz
    Hard Drives
    Samsung SSD 990 PRO 1TB
    Keyboard
    CODE 104-Key Mechanical with Cherry MX Clears
    Antivirus
    Microsoft Defender
  • Operating System
    Linux Mint 21.2 (Cinnamon)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Intel NUC8i5BEH
    CPU
    Intel Core i5-8259U CPU @ 2.30GHz
    Memory
    32 GB
    Graphics card(s)
    Iris Plus 655
    Keyboard
    CODE 104-Key Mechanical with Cherry MX Clears

My Computers

System One System Two

  • OS
    Windows 11 (23H2) Home
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Pavilion 577B5AA#ABA
    CPU
    Core(TM) i5-12400T
    Motherboard
    HP 89E9
    Memory
    12.0 GB (11.7 GB usable)
    Graphics Card(s)
    Intel(R) UHD Graphics 730
    Sound Card
    DFX Audio
    Monitor(s) Displays
    HO Generic PnP Monitor
    Screen Resolution
    1920 x 1080
    Hard Drives
    SAMSUNG MZVLQ10HBLB00BH1 SSD 1TB
    PSU
    HP Std. for this product
    Case
    All-in-One
    Cooling
    Fan
    Keyboard
    HP Wireless / Bluetooth
    Mouse
    HP Wireless / Bluetooth
    Internet Speed
    Link speed (Receive/Transmit): 1000/1000 (Mbps)
    Browser
    Google Chrome; Edge
    Antivirus
    Malwarebytes Pro / Windows Security
  • Operating System
    Windows 11 Home
    Computer type
    Laptop
    Manufacturer/Model
    HP 15tegooo [HP Pavilion Laptop Intel I-7]
    CPU
    Intel I-7-1165G7
    Memory
    8 GB DDR4-3200 SDRAM
    Graphics card(s)
    Intel Iris Xe Graphics
    Sound Card
    Realtek
    Monitor(s) Displays
    HP HD micro edge, Bright View, 250 nits
    Screen Resolution
    1366 x768
    Hard Drives
    256 GB DD4-3200 SDRAM
    PSU
    HP
    Case
    Std HP Laptop
    Cooling
    Fan
    Keyboard
    std
    Browser
    Edge
    Antivirus
    Windows Security
I make a Registry change as seen in Win10 Tutorials to add Command windows here to the right-click menu then run the old DOS commands on only that view. It even works when accessing a NAS drive.
Open command window here as administrator - Add in Windows 10 _ Tutorials.htm

1735597155841.webp

Forgot to add, many of the old commands don't work in Terminal/PowerShell.
 
Last edited:

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
I will look into it.
But the command line should work.
You need quotes around the folder path, since it has a space in it.

dir "D:\My Images" /a /s /b /tc /ta /tw > D:\filelist.txt
Aha!
Thanks.
 

My Computer

System One

  • OS
    Windows 11 home version 10.0.22631 Build 22631
    Computer type
    Laptop
    Manufacturer/Model
    Asus/zenbook 14 UX34055MA Q425MA
    CPU
    Intel 7 ultra 155H, 3800 Mhz, 16 Cores, 22 logical proc
    Motherboard
    ASUTEK
    Memory
    16
    Hard Drives
    1TB
Regarding the since it has a space in it part, I was doing some file movement in a Command Prompt window, needed to add folders since this is one time it's quicker than in File Explorer. I was using 2 names for each with a space between them, doesn't work, it made a folder for each name. However, it can be done in File Explorer, just needs more clicking.
The middle one here used the quotes:
1735598400069.webp
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
Why re-invent the wheel? Another vote for Karen's Directory Printer. Karen K left us a magnificent legacy of free software.
 

My Computers

System One System Two

  • OS
    Windows 11 2xH2 (latest update ... forever anal)
    Computer type
    PC/Desktop
    Manufacturer/Model
    HP Slim S01
    CPU
    Intel i5-12400
    Memory
    8GB
    Graphics Card(s)
    NVIDIA GeForce GT730
    Sound Card
    OOBE
    Monitor(s) Displays
    Acer 32"
    Screen Resolution
    1920x1080
    Hard Drives
    512GB KIOXIA NVMe
    1TB SATA SSD
    PSU
    OOBE
    Case
    OOBE
    Cooling
    OOBE
    Keyboard
    BT
    Mouse
    BT
    Browser
    Brave FFox Chrome Opera
    Antivirus
    KIS
  • Operating System
    Windows 11 Pro 2xH2 (latest update ... 4ever anal)
    Computer type
    Laptop
    Manufacturer/Model
    HP Pavillion 15
    CPU
    i7-1165G7 @ 2.80GHz
    Graphics card(s)
    Intel Iris Xe Graphics
    Hard Drives
    Samsung NVMe 512GB
    + numerous/multiple SSD Type C USB enclosures
    Internet Speed
    NBN FTTN 50
    Browser
    Brave
    Antivirus
    KIS
She did have good programs but if my memory serves me now I was doing DOS stuff before she had things on the 'net. MS-DOS 5 with Windows 3.1, '92
 

My Computers

System One System Two

  • OS
    Win11 Pro RTM
    Computer type
    Laptop
    Manufacturer/Model
    Dell Vostro 3400
    CPU
    Intel Core i5 11th Gen. 2.40GHz
    Memory
    12GB
    Hard Drives
    256GB SSD NVMe M.2
  • Operating System
    Windows 11 Pro RTM x64
    Computer type
    PC/Desktop
    Manufacturer/Model
    Dell Vostro 5890
    CPU
    Intel Core i5 10th Gen. 2.90GHz
    Memory
    16GB
    Graphics card(s)
    Onboard, no VGA, using a DisplayPort-to-VGA adapter
    Monitor(s) Displays
    24" Dell
    Hard Drives
    512GB SSD NVMe, 4TB Seagate HDD
    Browser
    Firefox, Edge
    Antivirus
    Windows Defender/Microsoft Security
I want to thank you all for being so helpful.
I installed Karen's tool because it makes everythingt simpler. I did not know about it before I read about it here.
Thanks.
 

My Computer

System One

  • OS
    Windows 11 home version 10.0.22631 Build 22631
    Computer type
    Laptop
    Manufacturer/Model
    Asus/zenbook 14 UX34055MA Q425MA
    CPU
    Intel 7 ultra 155H, 3800 Mhz, 16 Cores, 22 logical proc
    Motherboard
    ASUTEK
    Memory
    16
    Hard Drives
    1TB

Latest Support Threads

Back
Top Bottom