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
2 answers

Merge multiple .txt files from multiple directories in R

Merge .txt files from different sub directories I have a folder that is filled with sub folders of past dates (01_14 for example), inside each date folder there are 11 files named 01.txt, 02.txt... How can I merge all the .txt files into one data…
Diego
  • 13
  • 3
0
votes
2 answers

PHP __DIR__ displays system root

today i got some confuseing error my __DIR__ is pointing to the System root directory, but i need the Apache2 root-dir i tried to add php_admin_value open_basedir /var/www/html in apache2.conf and sites-aviable/000-default.conf is there any option…
cs8898
  • 28
  • 3
0
votes
1 answer

(Windows) Find files that do NOT have a specific attribute

I know that I can use the following to get a list of all files that have the archive attribute: 'dir /b /a:a' However, I cannot seem to get a list of files that do not have this attribute.
MrWhippy
  • 15
  • 4
0
votes
1 answer

Creating a DIR list and adding text to the beginning and end

What I am trying to do is list files including the file path, then add text and parentheses to them. So, i start with: 1.jpg 2.jpg 3.jpg And I use DIR /s/b /on *.JPG > LIST_JPG.DAT To get them to…
0
votes
4 answers

Why does '\xa' not appear when outputting echo "C:\xampp\htdocs\practice\myOnlineStore";

This line of code echo "C:\xampp\htdocs\practice\myOnlineStore"; outputs C: mpp\htdocs\practice\myOnlineStore Why is the \xa omitted from the output? Is there some sort of special character involved?
user3559356
  • 65
  • 1
  • 7
0
votes
0 answers

Window 7 using command line and dir: missing folder

I copied a folder sfold1 into folder fold and wanted to access sfold1 with console cmd. When I go to folder fold and ask for listing the subfolders sfold1 is missing: c:\fold>dir . .. sfold2 sfold3 I can see sfold1 with windows-explorer and also I…
giordano
  • 2,954
  • 7
  • 35
  • 57
0
votes
1 answer

CMD Directory Listing Substring Variable Length

setlocal set "s=DIR D:\MyFolder /S /Q ^|FIND /i "Owner" ^|FIND /v /i "sample" ^|findstr /m /i "\.mkv$"" for /f "Tokens=5,6*" %%a in ('%s%') do >>%tmp%\list.txt echo %%a %%b %%c wscript "C:\my.vbs" Hey guys, I have this code. Getting mkv files…
Rıdvan Çetin
  • 183
  • 5
  • 16
0
votes
1 answer

Creating a HTML Table with Python

I'm stuck on creating a HTML Table for this code here. have to try to output all the dir() of list, dict, tuple, str, int, and float in a HTML table with a limit of 7 column per row. I've tried many things and is unable to produce that. I kept…
user3804711
  • 133
  • 3
  • 13
0
votes
2 answers

Command Prompt: dir /s EXCLUDE full path but INCLUDE sub folders

I have a bit of a simple but annoying problem. I am making a batch file and I am using: dir /B /S /A:-D *.wad *.mdl *.wav *.spr *.bmp *.tga *.pcx *.mp3 *.txt *.res > sample.res to get: C:\Downloads\Sample1.wad C:\Downloads\Sample2.wav …
0
votes
1 answer

List files in subdirectories but don't list directories

When I do a dir /s /b command from command prompt I get the ususal files in the directory,subdirectories,and files in the subdirectories.For example: C:\Files\more_files>dir /b /s C:\Files\more_files\18.0.1025.39…
ModerateCarrot
  • 289
  • 1
  • 2
  • 12
0
votes
0 answers

How to get the path to the java file with the main method (src dir)

I have the following in eclipse EclipseJavaProject src/ some.package Program (+main method) some.xml some.other.resource Note: When running the app, the current dir is set to EclipseJavaProject/ by…
mist
  • 1,853
  • 2
  • 19
  • 33
0
votes
2 answers

How do I copy files repository to new folder with PHP

I have a folder named "repository" in my admin folders. This folder holds 2 files: index.html and content.php. When a user creates a new page the php creates a new folder specified by the user then will need to copy the two files into that folder…
dcp3450
  • 10,959
  • 23
  • 58
  • 110
0
votes
2 answers

php omit one php file in include directories

This script includes multiple files from a directory, how can I leave out a single file from the inclusion, for example, file one.php to leave out the included directory And here's the script
user2988099
  • 1
  • 1
  • 7
0
votes
1 answer

batch command in cmd vs. batch file

I want to print all the C files in a folder (including subfolders) without the path and with suffix .o \ instead of .c. So I found this command that works in cmd: FOR /F "delims=" %a IN ('DIR /B /S *.c') DO @ECHO %~na.o \" But when I create a bat…
user2877748
  • 107
  • 1
  • 5
0
votes
1 answer

reading in all text files from specific directory

I started learning matlab very recently and am stuck on this issue. My code looks like this: fileloc = '/no_backup/GroupData/ESRL/Download_18Mar2014/surface/' list = dir(fileloc, '*.txt') numTextFiles = length(list) disp(numTextFiles) So far I am…
user3613290
  • 461
  • 6
  • 18