hi
For various dull reasons, I'd like to assay a script that looks at the files in a directory, copies the filename of the latest and inserts it into a mysql table. It shld also check if the insert has been done already.
I am a web tinkerer (i work in construction) so my question may seem a bit ingenue but what functions do I need to g...
Hello!
Lets say a have some path:
C:\Temp\TestFolder1\TestFolder2
And I have some template:
C:\Temp
So i want to write function that will delete all subdirectories by template
void DeleteSubdirectories(string tlt, string path) {}
If I call this function with given parameters
DeleteSubdirectories("C:\Temp", "C:\Temp\TestFolder1\Tes...
I see that as of API Level 8, you can request a handle to special directories with Environment.getExternalStoragePublicDirectory. This takes a type such as DIRECTORY_MUSIC, DIRECTORY_PICTURES, etc.
I'm looking for an equivalent directory for other media types such as documents (Word docs, PDFs, etc.). My HTC Desire has a "/sdcard/My Doc...
I would like to list available directories and text files in specific directories recursively in Matlab command window (and ultimately in an m-file). I know commands like ls are available, but I would like to know the text files available in a string or vector before I recursively read each text file in the following file system structur...
I have been writing a program that watches a directory and when files are created in it, it changes the name and moves them to a new directory. In my first implementation I used Java's Watch Service API which worked fine when I was testing 1kb files. The problem that came up is that in reality the files getting created are anywhere from ...
I want to determine the absolute path of files used by a known process by reading the command line. Currently, the process is started with relative paths in the command line that point to various files such as config files. The problem is that if the paths are not relative to the folder containing the executable, I have no way of convert...
I have the python code... but how do i do it in c++?
I don't have much experience with c++. What i want is to make an exe that will be put as autorun in an cd. It has to open the application.ini file in my cd with xulrunner.exe in my cd. As the path will vary in each computer i hav to do something like this.
import subprocess
import os...
for subdir, dirs, files in os.walk(crawlFolder):
for file in files:
print os.getcwd()
f=open(file,'r')
lines=f.readlines()
writeFile.write(lines)
f.close()
writeFile.close()
I get the error as:-
IOError: [Errno 2] No such file or directory
In reference to my partial python code abov...
Hello, i was wondering if it is possible to let people access subversion root directory trough apache and 'dav_svn' module. Now i can only access only repositories that are 1 level lover than root directory ("svn/game" "svn/something" but not "svn/").
My httpd.conf:
<Location /svn>
DAV svn
SVNParentPath C:/SVN
AuthzSVNAccess...
In PHP I'm receiving a string from the user for a local file directory $path
I want to know if they've included the trailing slash (/) or not. I would like this to be cross platform so I'd like to use the PHP constant DIRECTORY_SEPARATOR
My failed attempts include trying to do a preg_match like
preg_match("/" . DIRECTORY_SEPARATOR . ...
my index file is-
include("application.php");
$DOC_TITLE = "MyMarket Home";
include("$CFG->templatedir/header.php");
?>
//html page code
<?
include("$CFG->templatedir/footer.php");
?>
application.php code-
error_reporting(15);
/* define a generic object */
class object {};
$CFG = new object;
/* database configuration */
$CFG->d...
I currently have it working so it displays a dialogue box to save the image on your computer:
if (isset($GLOBALS["HTTP_RAW_POST_DATA"]))
{
// get bytearray
$jpg = $GLOBALS["HTTP_RAW_POST_DATA"];
// add headers for download dialog-box
header('Content-Type: image/jpeg');
header("Content-Disposition: attachment; filename=".$_GET['name'])...
I'm looking for ideas for fast and effective way to walk through folders bottom-up using C#/.NET 3.5
for example:
-0
--1
---12
--2
---21
---22
---23
first walk though: 12,21,22,23
then: 1,2
Thanks
...
Good days,
My problem is giving a link to a directory, in an inner network. It is working for IE 6 but i need to do this for especially for IE7 and IE8.
My internal Link is like that: \CompName\Report\
I tried to do this with : file://.... but it didn't work. Any ideas?
...
i've got a module and a class that includes the module. these are not defined in the same file, or in the same folder. i want the module to get the directory that the class is defined in.
# ./modules/foo.rb
module Foo
def self.included(obj)
obj_dirname = # ??? what goes here?
puts "the class that included Foo was defined in th...
I got this colored dir script from http://tasteofpowershell.blogspot.com/2009/02/get-childitem-dir-results-color-coded.html:
function ls {
$regex_opts = ([System.Text.RegularExpressions.RegexOptions]::IgnoreCase -bor [System.Text.RegularExpressions.RegexOptions]::Compiled)
$fore = $Host.UI.RawUI.ForegroundColor
$compressed = New...
I would like to create a new directory that its content is soft links to the the content of an existing directory, and set full permissions for this new directory.
I know how to this is in bash:
mkdir -m a=rwx new_dir
cd new_dir
ln -s /path/to/old/dir/* .
but having some problems with finding the perl equivalent
...
I have this so far:
<?php
$path = "files/";
$files = glob("" . $path . "{*.jpg,*.gif,*.png}", GLOB_BRACE);
$i = 0;
foreach($files as $file)
{
$delete = unlink($file);
if($delete)
{
echo $file . " deleted!<br />";
$i - 1;
}
else
{
echo $file . " could not be deleted...<br />";
...
I have the following code
// Define the full path to your folder from root
$path = "../galleries/".$album;
// Open the folder
$dir_handle = @opendir($path) or die("Unable to open $path");
// Loop through the files
while ($file = readdir($dir_handle)) {
if(strlen($file)>1){echo "<a href='htt...
I'm attempting to use a sample function on the PHP manual website (posted by a user). The function is supposed to return a nested array of all of the files and/or folders in a specified directory of your server.
I'm just learning php, so I think it's more likely that I'm doing something wrong, and less likely that the function doesn't ...