directory

PHP file_exists directory

谁都会走 提交于 2019-12-24 12:48:34
问题 I am trying to use file exists in a subdirectory and running into some problems with the directory structure or perhaps something else. This code was working earlier when called from the main directory The file that includes the command is in a subdirectory that is one directory below the main directory of the domain. When I call the following on a file that I know exists nothing is returned, neither FALSE nor TRUE $imgpath1 = 'pics/'.$userid.'_pic.jpg'; $exists = file_exists($imgpath1); echo

How to specify multiple wildcards in a folder directory in CMD

北城余情 提交于 2019-12-24 12:40:25
问题 I found this post in regards to wildcards in directories. However, my problem is that I have multiple varying directory names between my static directories. For example: O:\123456 Client Name\Spring\Shoot 1 12345\01 MHP 01\PlCache\GreenScreen\ O:\121212 Someone Else\Spring\Shoot 1 21212\01 MHP 02\PlCache\GreenScreen\ The above link only allows for one wildcard directory instead of muliples. Within these GreenScreen folders, I have .png files I wish to delete. How would I write a .bat file

Want to show Directory Tree of server (PHP) at client side using FLEX?

杀马特。学长 韩版系。学妹 提交于 2019-12-24 11:39:08
问题 Using RecursiveDirectoryIterator of PHP i am able to create directory tree and can even flatten it using RecursiveIteratorIterator class , but I want to create directory tree structure which TREE component of flex understands . The following is an array structure in php which flex understands. array('label'=>'rootDirectory','children'=>array(array('label'=>'subFolder1','children'=>array(array('label'=>'file.jpg'))),array('label'=>'EmtptyFolder','children'=>array()))); Please show me a way to

Stay in directory with popen

最后都变了- 提交于 2019-12-24 11:35:17
问题 I want to make some C++ program and I'm using function popen here to send commands to command line in Unix. It works fine, but when I call cd directory , the directory doesn't change. I thing that it's same when I try to run cd directory in some script, after finishing script directory path change back. So, scripts I must run like . ./script.sh not ./sript.sh , but how to do that with popen function? I have tried to add ". " before first argument of popen , but running ". ls" makes error.

mod_rewrite mask folder name

可紊 提交于 2019-12-24 11:29:11
问题 Looking to do the following: domain.com - root directly with unique files that are different than individual cities. domain.com/city_name - this folder will have CMS elements and individual content based on the city the user ends up at. Ultimately, all files to control the CMS will be in /city_name but I page a file called pageLoader.php?page=$1 so I can do a $_GET['']; and request the name of the city they've entered, example: domain.com/vancouver So, what I need to do is "mask" the city

Batch Created Folder By Filename Part and Move

╄→гoц情女王★ 提交于 2019-12-24 11:20:03
问题 I found magoo's post and been playing around with it. I can't seem to get the DIR part to parse out the file name to create the folder and move the files to the respective folders. The following are examples of the files I'm working with: ... 800.1.gif 800.2.gif 800.3.jpg 801.1.gif 801.2.jpg 801.3.gif ... The batch should create folders 800 and 801 and move the 800.X and 801.X files respectively. I've tried FINDSTR and other masks and not having much luck. Here's magoo's original batch code

Win 7: CMD batch file for creating directories based on filenames

萝らか妹 提交于 2019-12-24 10:58:41
问题 I'm working on a CMD line batch file in a Win7 environment that will create directories based upon the filenames listed in a directory. I am using this code, but the output created is partial and incomplete with only setlocal enabledelayedexpansion for /r %%i in (*.wav) do ( set filename1=%%i set folder1=!filename1:~4,10! mkdir !folder1! ) pause I have this script saved as a CMD file in text format in the source directory, on a local harddrive, though it is in a subdirectory. The directory

Where do I put the image resource file? BitmapFactory.decodeFile()

孤街浪徒 提交于 2019-12-24 10:58:09
问题 I am trying to use this: BitmapFactory.decodeFile("logo.jpg") and I don't seem to have the file: logo.jpg in the right place in comparison to my apk. where should it go? P.S. the error I get is: Edit I now am using this: >BitmapFactory.decodeResource(getActivity().getResources(),"logo.jpg") and am now getting a compiler error that says: The method getActivity() is undefined for the type Brick (Brick is the name of the class) I don't care which solution works as long as one of them does 回答1: I

.BAT file to move files into folders and subfolders by filename… can't get subfolders to work

倖福魔咒の 提交于 2019-12-24 10:50:46
问题 I just can't figure this out. I have a bunch of files with name format: "PREFIX_PREFIX2_filename.pdf" I want to sort them into folders like this: "PREFIX/PREFIX2/(files)" This is what I have so far: setlocal enableextensions disabledelayedexpansion for %%f in (*_*_*.pdf, *_*_*.png) do ( for /f "tokens=1, 2 delims=_" %%p in ("%%~nf") do ( for %%d in ("%%~dpf.") do if /i not "%%~p"=="%%~nd" ( if not exist "%%~dpf\%%~p" md "%%~dpf\%%~p" if not exist "%%~dpf\%%~p" md "%%~dpf\%%~p" move "%%~ff" "%

AG_E_NETWORK_ERROR in SIlverlight

霸气de小男生 提交于 2019-12-24 10:06:21
问题 I have few directories in my IIS server (physical location inetpub\wwwroot\SampleApp) The directories contain .jpeg images. I am iterating these images in C# from Silverlight. And this is how I assign the image on the server to my Image placeholder in SL BitmapImage bi = new BitmapImage(); bi.UriSource = new Uri(url + sharedLink + currentSlide + ".jpg"); PresentationImage.Source = bi; where PresentationImage is the container for Images. Now, when I can access some of the directories and