w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Batch: Create a list of folders and then copy multiple files/folders into all of them
Try this: @echo off &setlocal cd /d "RootFolder=X:folder omy data" for /d %%a in (*) do xcopy "_TEMPLATE" "%%~fa" /sihrky For xcopy options see xcopy /?, to test the command without writing add option /l.

Categories : List

How to stop threads of following type in Java used for watching folders for files using WatchService for folders by using jToggleButton
There is a Thread.stop() method, but is has been deprecated, because it's unsafe. Instead of using the deprecated method(s), you can modify some variable to indicate that the target thread should stop running.

Categories : Java

JQuery File Upload and Carrierwave to Detect Folders and Sub Folders
I don't think this is possible. See here: http://www.codeproject.com/Questions/573788/HoeplustoplusGetplustheplusOriginalplusfilepluspat It appears that you can't know the context of the uploaded file on the source operating system. Therefore you can't create it's original parent folder structure on your system.

Categories : Jquery

Batch file creating folders in all folders of current directory
Total rewrite of answer. This will make a "Outlook Archive" folder in only the DataMy Documents subfolders of wherever the batch file resides. for /f "delims=" %%i in ('dir /ad/s/b') do if EXIST "%%iDataMy Documents" MKDIR "%%iDataMy DocumentsOutlook Archive" pause Credit to here

Categories : Windows

MATLAB: Opening and Editing Files nested in folders in folders
Check out subdir! On the file exchange, its an awesome function that can return all folders and all files in expansive subfolders, and you can filter file names by extension and whatnot. http://www.mathworks.com/matlabcentral/fileexchange/15859-subdir-a-recursive-file-search

Categories : Matlab

Delete all folders except 2 lastest folders in Windows
for /f "skip=2 delims=" %G in ('dir /B /ad-h /o-d') DO echo going to delete %G For /f to process lines of "output" from single-quoted DIR... Delims= is better. tokens=* will work here, but suppresses leading spaces. /b to suppress header output from dir /o-d for REVERSE-date order. You want to KEEP the two skipped dirs, which occur FIRS in a reverse-date sort. ...good echo safety measure.

Categories : Windows

Reading all folders in VBA
VBA itself has built-in functions to access the file system (e.g. Dir), but they're pretty unpleasant to use. To make the code above work, simply add a reference (Tools->References) to the Microsoft Scripting Runtime".

Categories : Excel

How to get Python to look at Sub-Folders?
There are several ways to do this. I'm a fan of glob for shp in glob.glob('C:/Naview/Platypus/Project/**/*.shp'): size = os.path.getsize(shp) print " Checking " + shp + "'s file size..." #If the file size is greater than 100 bytes, leave it alone. if size > 100: print "File is " + str(size) + " bytes" print shp + " will NOT be deleted " continue print "Removing", shp, "files" for file in glob.glob(shp[:-3] + '*'): print " removing", file os.remove(file)

Categories : Python

How to exclude all folders except one?
Use ! to exclude patterns in your .gitignore file E.g.: */ !public_html This excludes all directories (even those you will create after) except public_html.

Categories : GIT

tfs check-out in different folders at once
No. There's nothing like that provided by TFS out of the box. That said, it wouldn't be hard to write a small powershell script or batch file that takes the name of the file you want to checkout as a parameter and calls tf checkout for that file in both the English and French folders. You could also add it to Visual Studio as an External Tool and pass the Item File Name as the parameter so that you can call it from the IDE.

Categories : Tfs

TFS trying to check-in bin and obj folders
You can configure the tfs ignore. see the link for more detail http://msdn.microsoft.com/en-us/library/tfs/ms245454%28v=vs.110%29.aspx#tfignore

Categories : Visual Studio 2012

Folders Tree in php
To check if a file is a folder use is_dir() function. This recursive solution will list folders and subfolders : <?php function mkmap($dir){ $ffs = scandir($dir); echo '<ul>'; foreach($ffs as $file){ if($file != '.' && $file!= '..' ){ $path=$dir.'/'.$file; echo "<li><a href='".$path."'>$file</a></li>"; if(is_dir($dir.'/'.$file)) mkmap($dir.'/'.$file); } } echo '</ul>'; } mkmap('main dir'); ?>

Categories : PHP

TeamCity - using 2 svn folders
You could use build configurations to conditionally reference the same DLL, but on different paths. In the .csproj: <Reference Include="OpenCvSharp.MachineLearning"> <HintPath Condition="'$(Configuration)' == 'Debug'">....CommonassembliesOpenCvSharp.MachineLearning.dll</HintPath> <HintPath Condition="'$(Configuration)' == 'TeamCity'">..assembliesOpenCvSharp.MachineLearning.dll</HintPath> </Reference> You can add new build configurations in Visual Studio by right-clicking the solution file in Solution Explorer -> Configuration Manager... then clicking the dropdown for Active solution configuration: and selecting < New...>: The downside is that you'll have to edit your .csproj files to include the above conditionals, though.

Categories : C#

How to add all new folders and files to Git?
Keep in mind that you cannot add folders under revision. The only thing you can add to git is content. If you want to add empty folders. Add empty files in them and add them to git however you want. One trick to add everything you want is to use the interactive mode of git. git add -i if you press numbers, you can switch from one menu to the other 2) Add changes 3) Revert changes 4) Untracked files 5) Patch I suggest to explore this command. When you are in a menu, enter the number of the file in the list. Ranges are also accepted. like 1-10 will select files from 1 to 10. -5-7 will unselect files from 5 to 7 Also if some files aren't visible in the lists, but should be visible check that you don't have a gitignore file somewhere that hides them.

Categories : GIT

files with same name in different folders
Try this to get the files which have names in common: cd dir1 find . -type f | sort > /tmp/dir1.txt cd dir2 find . -type f | sort > /tmp/dir2.txt comm -12 /tmp/dir1.txt /tmp/dir2.txt Then use a loop to do whatever you need: for filename in "$(comm -12 /tmp/dir1.txt /tmp/dir2.txt)"; do cat "dir1/$filename" cat "dir2/$filename" done

Categories : Linux

Logging to different folders with Elmah
Based on my experience and a review of the Elmah docs at Elmah (code.google.com) I do not believe this is possible with one instance of Elmah. All the documentation talks about choosing the output location. It seems the only solution is to wrap calls to Elmah with a method that redirects to two different Elmah loggers.

Categories : C#

Folders tree with rights
On OS X you can install tree, using homebrew: brew install tree or, using macports: sudo port install tree and then, to view directories with permissions: $ tree -p -d Sample output: . ├── [drwxr-xr-x] folder1 │   └── [drwxr-xr-x] folder2 │   └── [drwxr-xr-x] folder3 │   └── [drwxr-xr-x] folder4 └── [drwxr-xr-x] folder5 ├── [drwxr-xr-x] folder6 └── [drwxr-xr-x] folder7

Categories : Osx

WRITE_EXTERNAL_STORAGE Possible target folders
Use Environment.getExternalStorageDirectory() to get available external storage directory. You will get the Android external storage directory. This directory may not currently be accessible if it has been mounted by the user on their computer, has been removed from the device, or some other problem has happened. You can determine its current state with getExternalStorageState(). Note: don't be confused by the word "external" here. This directory can better be thought as media/shared storage. It is a filesystem that can hold a relatively large amount of data and that is shared across all applications (does not enforce permissions). Traditionally this is an SD card, but it may also be implemented as built-in storage in a device that is distinct from the protected internal st

Categories : Java

How to exclude .svn folders from a ZIP archive?
Instead of zipping the source tree directly, why not have your script export a copy of the source tree without the .svn directories? There's a tool for that: svn export.

Categories : Svn

Laravel 4: img, css, js folders are returning 404
To include css/js/etc stored in public folder use URL::asset method, i.e. <link href="{{ URL::asset('bootstrap/assets/css/bootstrap.css') }}" rel="stylesheet"> Update: You may also try {{ asset('bootstrap/assets/css/bootstrap.css') }} Here, bootstrap folder is inside domain_root/public folder.

Categories : Laravel

Specifying folders not to sync in Web Deploy
UPDATE: Apparently, what you really want is prevent web deploy from removing existing directory on the destination server, but still have the folder created in case it's not there. You can accomplish this as follows: create YourWebProjectName.wpp.targets file next to you the project file with the following content: <?xml version="1.0" encoding="utf-8"?> <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup> <MsDeploySkipRules Include="SkipELMAHFolderFiles"> <SkipAction></SkipAction> <ObjectName>filePath</ObjectName> <AbsolutePath>$(_DestinationContentPath)\NameOfYourFolder\.*</AbsolutePath> <Apply>Destination</Apply> <XPath>&

Categories : Asp Net

Android Not Respecting my res folders
Personaly I would use Screen pixel density (dpi) for each layout. That is: ldpi: Low-density screens; approximately 120dpi. mdpi: Medium-density (on traditional HVGA) screens; approximately 160dpi. hdpi: High-density screens; approximately 240dpi. xhdpi: Extra high-density screens; approximately 320dpi. Added in API Level 8 See http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources

Categories : Android

delete all but X most recent folders
This will keep the 10 latest log files based on modification date: @echo off for /f "skip=10 delims=" %%a in (' dir *.log /o-d /a-d /b ') do echo del "%%a" Remove the echo to make it perform the deletions rather than just display them.

Categories : Windows

How big can be the images in the drawable folders?
Why so! Anyways it depends on the device used (SD Card). Larger image can effect the size of app too. So may be you have to look for what max size an Android app can have. The answer still is, Device Dependent! If you try to download (install) app with larger size you may get a failure: Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE] This is a thread describing this issue.

Categories : Android

Rails robots.txt folders
you have to put your robots.txt in /public folder and it will look like in below The following example "/robots.txt" file specifies that no robots should visit any URL starting with "/cyberworld/map/" or "/tmp/", or /foo.html: # robots.txt for http://www.example.com/ User-agent: * Disallow: /cyberworld/map/ # This is an infinite virtual URL space Disallow: /tmp/ # these will soon disappear Disallow: /foo.html for more information please follow below links https://developers.google.com/webmasters/control-crawl-index/docs/robots_txt and http://www.robotstxt.org/robotstxt.html

Categories : Ruby On Rails

CakePHP routes with sub-folders
I hope this may be helpful. Router::connect( '/catalog/:slug/:slug2/*', array( 'controller'=>'pages', 'action'=>'view' ), array('pass' => array('slug', 'slug2'))); and in your view file you can write like this to generate a link for above. echo $this->Html->link('link', array( 'controller' => 'pages', 'action' => 'view', 'slug' => 'slug', 'slug2' => 'slug2' ));

Categories : Cakephp

how can i access the folders in Dropbox php
Let's suppose you want to write file name myfile.extension in folder myfolder then your upload path will be: <root>/myfolder/myfile.extension then your endpoint url to upload file will be: https://api-content.dropbox.com/1/files_put/dropbox/myfolder/myfile.extension In case of download you first need to send request to endpoint: https://api.dropbox.com/1/media/dropbox/myfolder/myfile.extension In response you will get json like: {"url":"here is downloadable link"} To see contents/details in folder, endpoint will be: https://api.dropbox.com/1/metadata/dropbox/hello?list=true

Categories : PHP

Compare two different folders with an exclusion set
If you have PowerShell 3 this is relatively trivial: $allowedDiffs = "FileX.txt","FileZ.txt" Compare-Object (gci 'c:usersmhopkinsdesktop estApplication' -recurse -force') ('c:usersmhopkinsdesktop estR611' -recurse -force) | Where-Object {$_.InputObject -notin $allowedDiffs} Otherwise, in PowerShell 2, you would pipe The result of the compare-object command to a foreach loop, and then perform another for-each loop on the $allowedDiffs array.

Categories : Powershell

Grunt JS how to target * all folders
You should use double stars : src: ['docroot/components/**/*.js'] Note the double star for folders. If you want to limit to one folder deep scanning you can use src: ['docroot/components/{,*/}*.js'] this can help with performance if needed. More on how to specify targets : Gruntjs documentation - Configuring tasks : Globbing patterns

Categories : Javascript

Compiling folders into Executable
"Compilation" means something else. Anyway, .NET confusingly uses the same terms to describe "embedded resources", which are exposed as resource streams from the assembly, and the more API-friendly resx resources which are then compiled into .resources files that are also stored as embedded resource streams. If you want to use ResX resources in your project then go Add New Item > Resources (resx), then go to the Files tab and add references to your filesystem files, then build your project. You'll be able to access those files by going typing FooResources.MyFileName in your program's code, assuming you named your resx file FooResources.

Categories : C#

Merge two untracked folders with Git
I just tried this process, and it seems to work: git init . cp -r /dir/one/* . git add . git ci -m'Commit directory one' So now we have directory one on branch master. Do the same for two, creating a new branch that doesn't share history: git checkout --orphan two git rm -rf . cp -r /dir/two/* git add . git ci -m'Commit directory two' Then just merge as usual: git checkout master git merge two

Categories : GIT

Documentation on virtual folders
You are looking for a Shell Namespace Extension. An entry Point for documentation is Creating Shell Data Source Objects and Extending the Shell Namespace. An example of a almost complete Project can be found on codeplex: An almost complete Namespace Extension Sample Also in the Windows SDK 7, there is an example of using the Shell ExtensionNamespace (can be found in the folder "Microsoft SDKsWindowsv7.1Sampleswinuishellshellextensibilityexplorerdataprovider"). In this Folder you will also find a document which describes the programming model (Using the System Folder View.doc). If you really want to create a "real" file System Driver, you might want to look at this SO article: Creating a File System "Driver" which mainly referes to the Ext2 file system driver project.

Categories : C++

Why is realpath() only working with certain folders?
Plesk and openbase_dir restrictions Unless plesk has changed in the past few years - it sets open_basedir restrictions such that you can only access the httpdocs folder: The default open_basedir settings gives you the ability to write to 2 locations for each website. There should be no reason to write to any other folder. [...] /tmp /var/www/vhosts/domain.com/httpdocs As such if a request attempts to read from/write to any other location - it won't be able to do so, hence realpath will return false for any location outside the httpdocs folder. if you would like to see the script linked in the referenced forum post, it moved and can be found here: unplesk.

Categories : PHP

How can I copy folders to a directory?
Judging by the error message you are throwing the path does not exist. To copy an entire directory use the following: string sourcePath = @"C:UsersPublicTestFolder"; string targetPath = @"C:UsersPublicTestFolderSubDir"; if (System.IO.Directory.Exists(sourcePath)) { string[] files = System.IO.Directory.GetFiles(sourcePath); // Copy the files and overwrite destination files if they already exist. foreach (string s in files) { // Use static Path methods to extract only the file name from the path. fileName = System.IO.Path.GetFileName(s); destFile = System.IO.Path.Combine(targetPath, fileName); System.IO.File.Copy(s, destFile, true); } } else { Console.WriteLine("Source path does not exist!"); } See this MSDN page for more informatio

Categories : C#

Updating SVN folders using SVN export
Instead of using svn export, use svn checkout to export the trunk to the file system, and reuse this directory, e.g. something like: while sleep 5m; do svn checkout https://svn.example.org/svn/foobar/trunk /srv/foobar rsync -az /srv/foobar ... # exclude .svn subdirectory done

Categories : Svn

ivy cleancache but specific folders
There is no dedicated code in Ivy which delete the entries of only one module in a cache. But it is quite easy to do with regular Ant tasks. Assuming you have the default cache with the default pattern, here a piece of build.xml which will delete the cache of the module foo of the company com.acme: <delete dir="${user.home}/.ivy2/cache/com.acme/foo" />

Categories : Ant

How to concatenate files from different folders
Depending on your shell, this might work : cat {folder1,folder2,folder3}/output_*.txt. It uses brace expansion which is implemented in : Bash Zsh

Categories : Unix

.svn folders using a lot of disk space
These folders are necessary as long as you want to use SVN version control system. They are used to keep trace of your local version changes in order to commit your work and checkout (eventually merging with your information) upstream data. If don't want to use version control anymore you could delete all .svn folders. If you don't mind keeping history you could make a clean checkout, delete .svn folders and then create a new repository.

Categories : Svn

Can't open folders with spaces
You forgot a closing "/" at the end of your url request. So either append it to the end of the request: FtpWebRequest webRequest = (FtpWebRequest)WebRequest.Create(string.Join("/", url)+"/"); or add an empty string as url parameter: FtpWebRequest request = CreateFtpWebRequest("ftp://myserver.com", folderName,"");

Categories : C#

Is there a way to link a folders name to a particular cell?
Create a global variable to hold the cell value of the current selected or active cell. Use the method Worksheet_SelectionChange(ByVal Target As Range) to get the current Value. Private Sub Worksheet_SelectionChange(ByVal Target As Range) globalVar = Target.Value End Sub Now use the Worksheet_Change(ByVal Target As Range) method to access the globalVar and rename the folder. You will need to put in checks to verify the folder exists as well. Private Sub Worksheet_Change(ByVal Target As Range) 'code to rename folder End Sub

Categories : Windows



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.