Questions tagged [dir]

Abbreviation for a directory, a virtual container within a digital file system.

Also a command equivalent to ls in Unix and found in operating systems such as DOS, VMS, and MS Windows.

442 questions
18
votes
5 answers

Search by date using command line

Is there any way to search for files in a directory based on date? I want to find all files with created date greater than a specific date, is it possible to do it with dir command?
Karim Harazin
  • 1,463
  • 2
  • 16
  • 34
18
votes
6 answers

How to list all folder with size via batch file

I want a simple solution for list of folders and size of them in either txt or csv format. I use this code for folder list dir C:\Temp\*.* /b /a:d > C:\folderList.txt current output <> folder1 folder2 folder3 desired…
goldenbutter
  • 575
  • 2
  • 12
  • 25
18
votes
4 answers

Strange Windows DIR command behavior

I discovered this quite by accident while looking for a file with a number in the name. When I type: dir *number* (where number represents any number from 0 to 9 and with no spaces between the asterisks and the number) at the cmd.exe command…
dgo
  • 3,877
  • 5
  • 34
  • 47
16
votes
3 answers

Python "dir" equivalent in Clojure

Does anybody know if there is a Clojure equivalent for Pythons "dir". Basically I need to know the functions I can call on something or more specifically for java objects I want to know the methods and properties available (I am not sure if in java…
Ali
  • 18,665
  • 21
  • 103
  • 138
16
votes
4 answers

php access network path under windows

within PHP (XAMPP) installed on a Windows XP Computer Im trying to read a dir which exists on a local network server. Im using is_dir() to check whether it is a dir that I can read. In Windows Explorer I type \\\server\dir and that dir is being…
Max
  • 1,143
  • 3
  • 15
  • 21
14
votes
2 answers

dot slash vs nothing. What is the difference and what's better to use?

Just for curiosity. What is the better method to use and what is the difference between them ? vs
puaction
  • 181
  • 2
  • 12
13
votes
2 answers

Python Fabric: How to retrieve a filelist of a dir

I'm building a remote server admin tool using the python-fabric library and am looking for a good way of retrieving a filelist for a directory on the remote server. Currently I'm using run("ls dir") and am manually splitting the return string, which…
Ricw
  • 131
  • 1
  • 1
  • 4
13
votes
5 answers

Windows Dir command - order subdirectories by size

How could I display the subdirectories of a folder from largest to smallest using the dir command? I've tried using dir /O:-S command, and although it sorts files just fine, it doesn't seem to order the subdirectories. Ideally, the command should be…
Julian Laval
  • 1,210
  • 4
  • 17
  • 34
13
votes
3 answers

Dir.glob to get all csv and xls files in folder

folder_to_analyze = ARGV.first folder_path = File.join(Dir.pwd, folder_to_analyze) unless File.directory?(folder_path) puts "Error: #{folder_path} no es un folder valido." exit end def get_csv_file_paths(path) files = [] Dir.glob(path +…
sergserg
  • 21,716
  • 41
  • 129
  • 182
13
votes
6 answers

cmd dir /b/s plus date

I am looking for a cmd shell command in Windows XP, like "dir /b/s" that includes date and time values for each file in result. All data - path, filename and date/time - need to be on one line. Can anyone provide a command to accomplish this? Thank…
user1483922
  • 131
  • 1
  • 1
  • 3
12
votes
3 answers

Qt - How to get the "Temp" dir for an arbitrary user?

For each OS there is a location for storing temporary data. It could be like: C:/Users/[user name]/AppData/Temp (or so). How can I get this path independently from OS with QT?
Narek
  • 38,779
  • 79
  • 233
  • 389
10
votes
1 answer

Working with Unicode file names in VBA (using Dir, FileSystemObject, etc.)

I am iterating through files in a folder (which means I do not know the names in the folder), and have a file with a Polish ł character. The Dir function converts this to an l which means the filename can't be found at a later date. I've declared…
user3791372
  • 4,445
  • 6
  • 44
  • 78
10
votes
3 answers

How to dir without showing extension (batch)

For example, I have the folder d:\temp\ and four word document files in it (.doc) I know that dir /b "d:\temp" will give me File1.doc File2.doc File3.doc File4.doc But how can I do it so that there are only file names without…
z1lent
  • 147
  • 1
  • 1
  • 10
9
votes
4 answers

How to list all files in directory/subdirectory without path name CMD?

I Have a directory containing many subdirectories. Within these subdirectories are loads of .asf, .jpg, & .txt files. I would like to list all *.asf files within the directory and subdirectory but without the pathname. So basically I want to do the…
Nicknz125
  • 91
  • 1
  • 1
  • 2
8
votes
2 answers

How to get Ruby Dir#glob to return basenames, not absolute_paths?

FakeProfilePictures::Photo.all_large_names_2x (defined below) returns an array of absolute path names, but when I do Dir["picture_*@2x.*"] from the correct directory in irb, I only get the basenames (what I want). What's the best way to get the base…
ma11hew28
  • 121,420
  • 116
  • 450
  • 651
1
2
3
29 30