directory

How to determine files and directories in parent/other directories

人走茶凉 提交于 2019-12-25 05:44:55
问题 I found the answer to another question here to be very helpful. There seems to be a limitation of the sys/stat.h library as when I tried to look in other directories everything was seen as a directory. I was wondering if anyone knew of another system function or why it sees anything outside the current working directory as only a directory. I appreciate any help anyone has to offer as this is perplexing me and various searches have turned up no help. The code I made to test this is: #include

How can I move all files to the parent folder using windows cmd command

青春壹個敷衍的年華 提交于 2019-12-25 05:16:19
问题 For Example: I have C:\Folder\Subfolder1\SubfolderA\file1.pdf C:\Folder\Subfolder1\SubfolderB\file2.pdf C:\Folder\Subfolder1\Subfolderc\file3.pdf And I just want to have this path: C:\Folder\Subfolder1\SubfolderA C:\Folder\Subfolder1\SubfolderB C:\Folder\Subfolder1\Subfolderc C:\Folder\Subfolder1\file1.pdf C:\Folder\Subfolder1\file2.pdf C:\Folder\Subfolder1\file3.pdf I am using Windows 7, and tried different commands in CMD, like: Move C:\Folder\Subfolder1\SubfolderA\*.* C:\Folder\Subfolder1

Cocoa/OSX - Strange behavior in NSSavePanel that not shows sub-itens

我们两清 提交于 2019-12-25 05:15:18
问题 I've a NSSavePanel instance with a strange behavior: whenever I open it and click on a directory's arrow (the little expand button) it shows an indeterminate loading icon on the left-bottom corner that never ends, and not shows the directory/file tree. An image can see as follow: In that example, I've clicked in "workspace" directory. And the panel not shows the sub-itens. Even strange is that after I click it again (redrawing the directory) and then click again (re-open the directory), it

c# Cannot get list of subdirectories

醉酒当歌 提交于 2019-12-25 04:56:05
问题 I've seen this code (and similar) all over the web, but I just cannot get it to work. Whenever I debug it line by line, it breaks out of debugging and loads the application. No error messages are presented, and any code after the "faulty" line remains unprocessed. Here is the offending code: foreach (string folder in allFolders) { string[] subFolders = Directory.GetDirectories(folder, "*", SearchOption.AllDirectories); MessageBox.Show("Test"); } The foreach loop is entered into, but the

Some fields are not sorting properly in view

三世轮回 提交于 2019-12-25 04:52:16
问题 I'm trying to create a directory list in view. But some of the fields are not properly sorting. See the below image for my view configuration. And the output of the view. Please anyone help me to get the correct output. 回答1: you likely have a space (i.e. " ") at the beginning of your titles, or some other character that isn't displaying. 来源: https://stackoverflow.com/questions/27520119/some-fields-are-not-sorting-properly-in-view

Batch command to move many folders inside an alfabetic directory structure

久未见 提交于 2019-12-25 04:30:17
问题 I have this content inside a directory [FOLDERS] Atomic Animal Cat flash Zoe [FILES] text.txt audio.rar I want to reorder moving folders inside an alfabetic directory structure like this (case is irrilevant). I want move only folders no files A [Atomic, Animal] C [cat] f [flash] Z [zoe] file1.rar file2.txt where A,C,f,Z are parent folders. Folders in bracket are MOVED folders not CONSOLIDATED folders! Which .bat command can I use? I want move inside a unique folder called A for all folders

Why is there: Warning: printf(): Too few arguments on line 59

我们两清 提交于 2019-12-25 04:26:03
问题 I get an error in my php code when trying to get all the files from their directory, then creating html links for them and I don't understand why. Here is the error: Warning: printf(): Too few arguments in C:\Users\Ryan\Documents\Web Development\xampp\htdocs\muzik\player.php on line 59 Line 59 is: printf("<li><a href='mp3/%s'>%s</a></li>", htmlentities($file->getBasename())); Here is the code: `echo '<ul id="playlist">'; foreach( new DirectoryIterator('mp3/') as $file) { if( $file->isFile() =

MATLAB - Specified all paths, but it's always opening to the last path?

谁都会走 提交于 2019-12-25 04:18:24
问题 sound_dirs={Ball, Daddy,Jeep, No, Tea_Pot}; The 5 variables in sound_dirs are path-char-vectors to 5 different sound folders. data_structure is a cell of (length(num_sounds) row x 3 column cell each row corresponds to a different sound first column = directory name second column = files struct for .wav files third column = formant data I want to be able to index into the files struct and do some processing on each .wav file of the same type, and then generate statistics on the group. I use

Python - File does not exist error

北城余情 提交于 2019-12-25 04:07:30
问题 I'm trying to do a couple things here with the script below (it is incomplete). The first thing is to loop through some subdirectories. I was able to do that successfully. The second thing was to open a specific file (it is the same name in each subdirectory) and find the minimum and maximum value in each column EXCEPT the first. Right now I'm stuck on finding the max value in a single column because the files I'm reading have two rows which I want to ignore. Unfortunately, I'm getting the

Unable to List File or Directory Contents on ASP.NET Page using Shared Drive

你。 提交于 2019-12-25 03:59:21
问题 In this question I'm using Visual Studio 2008. My code is quite simple, as it was used from a reference I grabbed off the web. I'm using ASP/VB.Net, IIS6.0 on a Windows Server 2003 box. I've looked at various sources online, and have not been able to piece together a proper result. The purpose of this is to list a slew of directories and their respective files, and allow the user to eventually manage that directory (such as open and delete files). Here is my ASPX page: <%@ Page Language="vb"