Python Forum
is there equal syntax to "dir /s /b"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
is there equal syntax to "dir /s /b"
#1
sorry for my bad English,
currently i looking all files in a folder and subfolder like "dir /s /b" in windows-cmd
D:\test>dir /s /b
D:\test\test
D:\test\test (2).py
D:\test\test.py
D:\test\test\test.py
is there any equal syntax like this in python?
Note:
I know code
import os
for text in os.listdir():
    print(text)
but that only show files name, I need full path
Reply


Messages In This Thread
is there equal syntax to "dir /s /b" - by kucingkembar - Aug-16-2022, 07:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Solving equation equal to zero: How to resolve the syntax error? alexfrol86 3 2,098 Feb-21-2022, 08:58 AM
Last Post: deanhystad
  Can a variable equal 2 things? Extra 4 1,581 Jan-18-2022, 09:21 PM
Last Post: Extra
  Not equal a dictionary key value bazcurtis 2 1,994 Dec-11-2019, 11:15 PM
Last Post: bazcurtis
  Misunderstanding with the “if” statement and “not equal” scriptoghost 6 4,520 Jun-23-2017, 09:43 AM
Last Post: DeaD_EyE

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020