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

How to get the name of most recently file in specific directory?

I try to get the most recently name-file in specific directory, with dir command: dir /O:D|tail -3 |head -1 but I got this line: 11/23/2014 01:18 PM 393 2.32.5100-results.json thanks
kasis
  • 35
  • 5
0
votes
1 answer

How do I look for a file and execute it via DOS?

The title is pretty much self explanatory and my example makes it pretty obvious but I'm trying to find for a particular exe file and execute it. cd c:\ for /f %%f in ('dir /b /s eclipse.exe') do ( start %%f -clean ) echo Done! pause…
Steven
  • 249
  • 5
  • 14
0
votes
1 answer

node.js file upload Error: ENOENT, rename ' tmp/xxxxxx.jpeg', think the fault is in my path, what am I doing wrong?

My code looks like this: and the terminal output looks like this: But I dont want the path to be under "routes". But rather under bears/public/... Appreciate any help!
Simon Guldstrand
  • 488
  • 1
  • 5
  • 24
0
votes
3 answers

Windows batch is not listing complete dir content

I have a simple batch which saves the content of a specific folder and its subfolders to a text file. Here's the original command. It is used on a Windows 7 environment. dir I:\Logistics\Hermes\1445\LIN\ /a /s /b > C:\out\LIST.txt Problem: It…
chrimens
  • 23
  • 9
0
votes
1 answer

PHP __DIR__ Down folder "ROOT PATH"

/home/dev/109/websits/htdocs/proyect/config/index.php when I "echo DIR" give me a path "/home/dev/109/websits/htdocs/proyect/config/" but I want to download a folder but I do not know if the project folder or another name will be…
user2447290
0
votes
1 answer

Save filenames to textfile and add a string in front of line

I would like to save the output of a list of files to a file (by using a Windows batch file). I know I can do this by the command dir /b *.* > start.txt, but for each line in the file "start.txt" I would like to add @@ in front of the file name. So…
rarejoep
  • 1
  • 1
0
votes
1 answer

Adding to strings in C while listing Directories

I am trying to list a directories in a specific Dir in C. But the problem is when I want to add the path and the dir name. I wrote a function to add the path and dir name. void setNewString(char* str1,char* str2) { // Declare new buffer …
0
votes
2 answers

swift path to custom dir for images

I have imagesDir in myproject dir MyProject ---- MyProject ---- AppDelegate.swift ---- Main.storyboard ---- ImagesDir ---- images1.jpg ---- images2.jpg How can retrive the correct path to "imagesDir" Is a good…
Stefano Vet
  • 567
  • 1
  • 7
  • 18
0
votes
1 answer

Php sort file from dir in desending order (Latest at top)

**Files by date descending order, How to do it? ** Need to show Files by date latest at top function list_dir($dn){ if($dn[strlen($dn)-1] != '\\') $dn.='\\'; static $ra = array(); $handle = opendir($dn); while($fn =…
Rishi
  • 75
  • 10
0
votes
2 answers

Execute multiple command onto same terminal using bash script

I am trying to run a bash script which contains few commands to execute. I want to open a terminal and execute multiple commands into it. I have written commands to set the directory path and want to make a folder there. Code : gnome-terminal…
iNikkz
  • 3,729
  • 5
  • 29
  • 59
0
votes
2 answers

Perl: Bad Symbol for dirhandle

This is my code: opendir(DIR, $directoryPath) or die "Cant open $directoryPath$!"; my @files = readdir(DIR); #Array of file names closedir (DIR) or die "Cant close $directoryPath$!"; I'm using @files to create an array of the file names within the…
user3001499
  • 811
  • 4
  • 16
  • 32
0
votes
2 answers

How to get Directory and file name of an image selected from gallery

I need to use this function, java.io.File.File(File dir, String name) public File (File dir, String name) Added in API level 1 Constructs a new file using the specified directory and name. Parameters dir the directory where the file is …
Aishvarya Jaiswal
  • 1,793
  • 6
  • 34
  • 72
0
votes
3 answers

How to get all files from directory and sub directory with a given pattern

I have a directory containing sub directories each one of this directories has a file called *.properties I want to search for these files with java Thanks
einstein007
  • 61
  • 1
  • 2
  • 7
0
votes
3 answers

Get inverse list of files through dir command in batch

I'm triying to get a list of files of subfolders in a inverse order using this: for /f "tokens=*" %%f in ('dir /s /b /o-n') do (echo %%f) I'm getting this result folder1\file2, folder1\file, folder2\file2, folder2\file1, folder3\file2,…
alesinho
  • 3
  • 4
0
votes
2 answers

Capistrano tmp:dir error:cannot run git-ssh.sh: No such file or directory

on my server I´m not allowed to create an tmp folder that executes any content. So with capistrano 3 I have the option to set a path for a kind of custom tmp folder. Is there any syntax I have to consider, cause my settings execute an error with cap…
burn4ever
  • 1
  • 1
  • 3