directory

System.StackOverflow Exception while Parsing through Directory Structure

懵懂的女人 提交于 2019-12-24 18:35:04
问题 What im trying to achieve is,Get the list of all files in a specific drive or Folder Structure by parsing through the Files.I'm also trying to handle the Unauthorized Exception which occures in case of protected files.The Code works fine in most drives and folders but in some cases like the Windows Drive(C:),A System.StackOverflow EXception is thrown.What could be the problem?Is there a better way to do it? static void WalkDirectoryTree(System.IO.DirectoryInfo root) { System.IO.FileInfo[]

Recusively trying to find file within folder using keyword (VBA-Access)

血红的双手。 提交于 2019-12-24 17:40:23
问题 I am creating an vba-access application with a drop down box Combo_History that gives the user the ability to launch a .pdf file from a sub-folder within a main folder called "Scanned Work Orders (Archives)". What I am trying to do is use a certain number called an "M" number(M number because every number starts with an M ex: M765196) to find this file without using a specific sub folder here is what i have so far: Dim fso, oFolder, oSubfolder, oFile, queue As Collection Set fso =

How to generate folder with Lazy Loading Prefix (+) using angular cli?

北战南征 提交于 2019-12-24 17:24:00
问题 We began to rewrite our angular 2 app using mainly angular-cli to generate components etc. The Problem now is, in order to adhere to the Style Guide, major component folders, which later may be loaded lazily should be prefixed with a "+" . Using --help of the cli generate instruction I could see two options : --prefix --route. But setting these to true had no effect on the generated folder name. My question now is, what is the correct way to generate lazy loaded folders prefixed with a "+"

addToFolder(): The copy version of the file is deleted, if the original version is deleted

一曲冷凌霜 提交于 2019-12-24 17:23:55
问题 I started doing development with google scripts few days ago and recently joined stackoverflow. I have a problem with addToFolder() function. I have the following piece of code that copies my new spreadsheet into a folder (test/sheets) in my Google Drive: var ss = SpreadsheetApp.create("test"); var ssID = ss.getId(); DocsList.getFileById(ssID).addToFolder(DocsList.getFolder("test/sheets")); My problem is that now I have 2 versions of the same file (one in the root of my Google Drive folder

Autorun.inf opens a batch file which creates a directory doesn't work

心已入冬 提交于 2019-12-24 17:06:25
问题 I'm trying to make a autorun.inf file which would open a .bat file from a flash drive. What I have in the autorun.inf file: [autorun] open=launch.bat icon=icon.ico What I have in the launch.bat file: @echo off ::start mkdir "C:\ThisIsATest" exit When I have inserted the flash drive to my personal computer, I have noticed that the icon of the drive has changed, but I can't see the effect of the launch.bat file. I have tried the batch file to see if it works and it works. Thus, I believe that

how to create a collection from list of strings that represents a directory structure in C# or VB

ε祈祈猫儿з 提交于 2019-12-24 15:13:45
问题 First, I did check this post but it is in Python, first, and second it appears to be actually making the directories, which I cannot do in this scenario. Second, these are not directories that exist, nor can I create them. I have an input in C# like this: List<string> filePaths = new List<string>(); filePaths.Add(@"ProgramDir\InstallDir\Module1\mod1pack1.exe"); filePaths.Add(@"ProgramDir\InstallDir\Module1\mod1pack2.exe"); filePaths.Add(@"ProgramDir\InstallDir\Module2\mod2pack1.exe");

How to return the full path from a command line argument

萝らか妹 提交于 2019-12-24 14:53:18
问题 I have an application that can be run from Explorer, and passes the selected directory to the application. So I can use the following code: private void frmMain_Shown(object sender, EventArgs e) { //open the dir DirectoryInfo d = new DirectoryInfo(cmdArgs); SelectDirectoryInTree(d); } This however fails if the user selects a Special Folder. The path returned for these folders is different. So, for example, if the user selects Libraries\Documents folder, (or any other folder in there) the

How to create a directory, and save a picture to it in Android

无人久伴 提交于 2019-12-24 13:47:43
问题 This is a function I have written that tries to: Create a folder with the users name Save a .jpg inside of that folder The folder creation works fine, however when I try to save the pictures, they all save with the correct name, however they do not save in their intended folders. In other words, instead of having a folder containing a bunch of folders each containing one picture, I have one folder containing a bunch of empty folders, and a bunch of pictures all outside their folders (I can

Write folder in Mac OS X with sandbox active

烈酒焚心 提交于 2019-12-24 13:09:35
问题 I created a small application in Xcode with Cocoa Desktop and this application has to create a folder in the current user's desktop Mac OS X When I run the application without using the app creates a sandbox folder properly on desktop If I use the sandbox putting right files for read / write I can not create a folder on the desktop Does anyone know how to solve this as to send the application to the AppStore is necessary to use sandbox? 回答1: You shouldn't just create a folder on the desktop,

QTreeWidget for File Tree and Sub-folders

倖福魔咒の 提交于 2019-12-24 12:50:07
问题 So, what i'm using is a QTreeWidget to make a File-Tree. I can easily create the files, and folders. But the issue comes when we talk about sub-folders. For example: Folder1 Folder1/SubFolder1 Folder1/SubFolder1/SubFolder2 How do i exactly create the sub-folders? Here's my code to make the folders: void Tree::addFolder(const QString &folderName) { QTreeWidgetItem *item = new QTreeWidgetItem(); item->setText(0, folderName); // Sets the text. m_projectItem->addChild(item); // Adds it to the