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

Image not viewable in folder

I have an image encoded in a base64 string and i need it to save on a folder as a image. This is the code: $img = Input::get('myField'); define('UPLOAD_DIR', 'C:/wamp/www/laravel/dentalRoyale/public/assets/profile/'); $img =…
Kerbs
  • 1
  • 5
0
votes
2 answers

How can I putting dynamically string into array using C

J have below a code which display the name (this is char[]/string) of directories or files in given directory. I want to put this names dynamically to array. In print table1 displays correct the values(name of directories or files) which are…
0
votes
1 answer

Preserve Dir list in VBA

How can I avoid resetting Dir? d = Dir(root & "*", vbDirectory) d = Dir(): d = Dir() ' skip . and .. While d <> "" f = Dir(root & d & "\*.txt") While f <> "" ' do something with f f = Dir() Wend d = Dir() ' RunTime…
cheezsteak
  • 2,731
  • 4
  • 26
  • 41
0
votes
2 answers

Building a directory listing via batch script. Need to exclude some directories. How?

I work with hundreds of thousands of folders/files, most of which have certain log files. It takes a lot of time to manually navigate through the folders to grab the logs, so Ive been using a script to do it. Its a 2 parter. First part runs…
Duxa
  • 966
  • 2
  • 14
  • 27
0
votes
1 answer

PHP Script to retrieve filename as an achor tag

I can't work out how to write a PHP script that will iterate over a set of files in a folder (let's say, 3 MP3 files), output the filename and add anchor tags around this to provide a download link. I assume this is how I would begin but I have no…
0
votes
1 answer

Why is this use of the "Dir" function not working as I intended?

I'm trying to place the names of all of the filenames in a folder into a list on excel, so that there is one filename per cell. However, using the code below, it writes in the number of files in the folder -1. So, if there are 4 files in the…
Barney G
  • 109
  • 1
  • 3
  • 10
0
votes
1 answer

Excluding specific string within dir command

setlocal set "s=DIR C:\Folder /S /Q^|FIND /i "Owner" ^|findstr /m /i "\.mkv$"" for /f "Tokens=5,6*" %%a in ('%s%') do >>%tmp%\list.txt echo %%a %%b %%c This code lists mkv files owned by OWNER in lists.txt But I want to exclude some strings. For…
Rıdvan Çetin
  • 183
  • 5
  • 16
0
votes
1 answer

BATCH Dir command and replace some variables

First question: I can list path names & folder names, but I have a problem. I don't need path names, look "<-- this": C:\Users\Ad\Desktop\ready_pc\data\daiva\a\building <-- this. C:\Users\Ad\Desktop\ready_pc\data\daiva\a\building\daiva.dds My batch…
liveth19937
  • 61
  • 1
  • 2
  • 6
0
votes
1 answer

how to get the DIR of the user folder?

Hello all well I'm trying to get the DIR of the user folder which is practically located at : c:/Users/userName/ but the userName is different from one user to the other of course, so how would i get the DIR of the folder? I know for the desktop…
Boolena
  • 225
  • 1
  • 2
  • 10
0
votes
1 answer

Getting file list by owner and by extension in batch

I wanted to list files for specified Owner and specified Extension. DIR D:\Folder /S /Q|FIND /i "OWNER" | findstr /m /i "\.mkv$" >> D:\Folder\list.txt I tried this, its working but its printing the owner name, date,size. All I want the file list.…
Rıdvan Çetin
  • 183
  • 5
  • 16
0
votes
1 answer

Dir cmd prompt omits files - why?

I am using the following cmd prompt to acquire a list of the files and folders in a directory: v:>dir/s>name.txt. The text file seems to be too small for my directory (3700 items), as it omits items listed lower on the directory. I initially…
oymonk
  • 427
  • 9
  • 27
0
votes
2 answers

Count dir and rename multiple uploaded files on upload.

I'm trying to upload multiple files (imgs) from a form and I want to get the count of the directory they will be uploaded to then rename them accordingly. 1.jpg, 2.jpg, 3.jpg and so on depending on how many are uploaded. The closest I've come is…
0
votes
2 answers

Powershell Property Value Data parse

I want to create a powershell script to pull specific data from a specific property from a specif file. So in a nutshell. I want to get the FileVersion data out of the property of versioninfo from a .exe. I'm using the following command to get…
0
votes
1 answer

Running dir against multiple directories

If I run, for example: dir /s /b /o:gn "c:\Program Files\TrueCrypt" | findstr .sys I comfortably get c:\Program Files\TrueCrypt\truecrypt.sys c:\Program Files\TrueCrypt\truecrypt-x64.sys ..in return. But if I add a folder that doesn't exist (I…
user2295413
0
votes
2 answers

writing multiple text files into arrays python

I'm trying to perform some mathematical functions on the values in the arrays. But I want to do it for more than one file, since it's tedious to use loadtxt for each file. Since each .txt file contains three columns, I want to assign t, x, y as the…
Kimi Lee
  • 43
  • 2
  • 9