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
-1
votes
1 answer

want to find mklinked folders by program

is it possible to find out a folder is actually a hard link created by mklink? I want to get folders and subsequent sub-folders, but hard linked folders drops me into a loop. I appreciate any help or clues to solve the problem. Mehrdad…
-1
votes
1 answer

How to dynamiclly import changing module?

Step 1: assume this is the changing module, named test_module.py: #coding=utf8 # changing module class hello(object): pass """ class world(object): pass """ Step 2: dynamically reload the changing module, named…
kkkkkk
  • 632
  • 2
  • 8
  • 14
-1
votes
1 answer

make a list of directories by creation date

I have a list of directories, each with 1 file in them, I need to access the file with the latest date. Can i make a list of directories by date then take the last one? If so how can I do this, I have seen some questions about sorting files by date,…
Andy
  • 259
  • 1
  • 4
  • 16
-1
votes
1 answer

List file name patterns and residing directories

Using Mac OS X Mavericks, how do I find file name patterns residing in different, unknown, directories (ie: would be equivalent of Windows/DOS command: dir /b \x*.y*) ?
-1
votes
2 answers

Batch program writing output of 'dir' in text file

I am learning about batch programming and I have got problem. I want make a program which places the output of the dir command to file.txt. What am I doing wrong? ECHO OFF DIR > file.txt
user3164700
  • 73
  • 1
  • 2
  • 7
-1
votes
1 answer

Open dir from read txt

PHP script who open and search data from .txt is: function explodeRows($data) { $rowsArr = explode("\n", $data); return $rowsArr; } function explodeTabs($singleLine) { $tabsArr = explode("\t", $singleLine); return $tabsArr; } $filename =…
-1
votes
3 answers

Delete the zip files with date format by comparing to the present date in Python

I have a list of files(Actually these are the files in some directory) as below for example import os path = '/home/user/folder' files = os.listdir(path) so result is as below files =…
Shiva Krishna Bavandla
  • 25,548
  • 75
  • 193
  • 313
-1
votes
1 answer

sort folders by time php

This code shows a list of folders. How can I sort these folders by time (last changed) ? function folderlist(){ $startdir = './'; $ignoredDirectory[] = '.'; $ignoredDirectory[] = '..'; if (is_dir($startdir)){ if ($dh =…
user1835767
  • 29
  • 1
  • 5
-2
votes
2 answers

need to list first 2 directories from list of directories with DOS command

i have a directory in windows server in which several directories are there which i have sorted while listing. Now i need to find first 2 directories from that list. can anyone please help me with DOS command?
vishal
  • 247
  • 1
  • 2
  • 9
-2
votes
1 answer

How to store remote directory listing to a file with Filezilla

Command line ftp no longer works for a remote site, so I'm now using FileZilla. Fine for uploading and downloading, but how do I get a directory listing on the remote machine? In ftp, I would type dir [remote directory name] [local file] I can't…
Joe Huang
  • 1
  • 1
-2
votes
1 answer

How can i list all the files in a folder with a specific name in matlab?

I have been making a loop that assign Mx names for 121 different files in a folder. allFiles = dir( '*.xls''String' ); allNames = { allFiles.name }; for ii = 1:length(allNames) M(ii) = xlsread(allFiles(1i)); end Trouble is that there is no…
-2
votes
2 answers

How to do search when in interactive python shell

Sometimes, I need to use dir(obj) to find which members and methods belong to obj. Then I got a lot of methods, i.e. a big list like the following: ['__class__', '__delattr__', '__delitem__', '__dict__', '__doc__', '__eq__', '__format__',…
Xing Shi
  • 2,152
  • 3
  • 21
  • 32
-3
votes
1 answer

Windows directory locker implementation

** I want to do this for educational cause only, for myself, not to replace any system that is already implemented in the Windows OS ** I want to implement some kind of directory locker in Windows 10. In order to do so, I want my program to run in…
Doron
  • 161
  • 2
  • 5
  • 13
-3
votes
1 answer

Saying there are 0 arguments when I have 2? Trying to open a CSV file to write into

I'm trying to read from a CSV file and codify people into groups using an equation. I append the name of their group they fall into to the end of the array that their row creates. Then I write it to a new file so I don't overwrite the original…
ABvsPred
  • 67
  • 7
-3
votes
1 answer

How Does This Code Work? (windows batch)

@echo off setlocal disabledelayedexpansion set "folder=%~1" if not defined folder set "folder=%cd%" for /d %%a in ("%folder%\*") do ( set "size=0" for /f "tokens=3,5" %%b in ('dir /-c /a /w /s "%%~fa\*" 2^>nul ^| findstr /b /c:" "') do if…
BoKa1337
  • 15
  • 4
1 2 3
29
30