w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
not found [No such file or directory] error, even though the file present in that directory on RH Linux 6.2
Enter this: ls -ls /data/RAIL/rpo402/db/upgrade List the output for the file and look at it's permissions. Make sure the file isn't empty. Make sure the file has permissions to be executed as a shell. chmod +x upgrade_db.ksh Look at the first line of the file, make sure it has a proper header for a shell script. Maybe Korn Shell requires the shell declaration in the header. Check dmesg to see if there are any error messages, perhaps the file system and check inodes.

Categories : Linux

How to access a file in a directory from other directory, when both are in same parent directory with HTML
if dir1 and dir2 are in the same parent directory then this is how you access 2.html from 1.html: <a href="../dir2/2.html">link to 2.html</a> hope it helped :)

Categories : HTML

How to set up local repo to have different root directory than remote "upstream" directory of an open source project?
Broadly speaking, No. Git does not allow you to have two different view of the same repository that have different directory structures. Solution 1: Ignore git altogether for uploading That said, I think you don't need this anyway. If your webhost provides public_html, why not just scp the files you want to the location you want? You could make this a task in a Makefile/Rakefile/whatever and then run it from your local machine when you want to upload, for example, a makefile task could look like: upload: scp -r ./upload/* me@myhost:/home/me/public_html/ .PHONY: upload Solution 2: link into your git directory on your webhost Instead of manually uploading your files, simply link your public_html directory to your upload directory in your git repository on your server. For example:

Categories : GIT

How to set default major mode in directory-local file?
i can't answer your first question (and in fact, will like to hear the answer for that myself) but fir the auto-mode-alist you can have (setq auto-mode-alist (cons '("<your dir path here>." . c-mode) auto-mode-alist))` this should give you the result you want

Categories : Emacs

How can I send file from local directory to sftp using spring?
You can refer the example at https://github.com/spring-projects/spring-integration-samples/tree/master/basic/sftp This has the basic example for 1.Transfers files from remote to local directory 2.Transfers files from local to the remote directory 3.Interact with the remote SFTP server with commands Note : First functionality is achieved via polling concept Also Spring SFTP Integration Adapter documentation is available at - http://docs.spring.io/spring-integration/reference/html/sftp.html

Categories : Spring

how to save excel file in my local directory in php with out downloading
The headers really have nothing to do with creating or saving a file on the server. The headers only tell the browser how to interpret the content. Take a look at PHP Excel for a good resource on creating Excel files.

Categories : PHP

how to set a path to the local directory in c# for .mdf database in Service.cs file
If the file is in the same assembly folder you can use this string folder = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location); Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None); config.ConnectionStrings.ConnectionStrings["myCS"].ConnectionString = config.ConnectionStrings.ConnectionStrings["myCS"].ConnectionString.Replace("#folder#",folder); config.Save(ConfigurationSaveMode.Full, true);

Categories : C#

getting the full filenames from all top directory files in a specific directory and suppressing the occuring error
Did I understand correctly that you only need the File-names with directory-names. This code works for me, no elevations needed. private void button1_Click(object sender, EventArgs e) { string folder = @"C:windowsprefetch"; string filemask = @"*.pf"; string[] filelist = Directory.GetFiles(folder, (filemask)); //now use filelist[i] for any operations. }

Categories : C#

Emacs Auctex compile error: "Use M-x make-directory RET RET to create the directory and its parents"
Sometimes AUCTeX gets confused parsing the log of (La)TeX compilation and isn't able to guess the correct line raising the error. In some cases AUCTeX issues an obscure message "Error occured after last TeX file closed", when there are unbalanced parentheses, in your case it suggests you to create a new directory. To help AUCTeX finding the correct line raising the error you can add the -file-line-error option to latex or pdflatex by customizing the variable LaTeX-command-style. To do this add the following code to your .emacs: (setq LaTeX-command-style '(("" "%(PDF)%(latex) -file-line-error %S%(PDFout)"))) See also the AUCTeX FAQ: 8. Why does TeX-next-error (C-c `) fail? When writing the log file, TeX puts information related to a file, including error messages, between a pa

Categories : Emacs

Redirect all requests to a directory and it's subdirectories to a file inside the directory, using Apache2 server
Place an .htaccess inside project one folder with the following rule: Options +FollowSymLinks -MultiViews RewriteEngine On RewriteBase /php/projectone/ RewriteRule ^(view/)?index.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . view/index.php [L] And you can repeat that for any other project folders you have. by changing the RewriteBase.

Categories : PHP

Moveuploaded files function in PHP moves the file to the temp directory but not to the destination directory
First time you called move_uploaded_file() you moved that file from temporary folder to $workDir. After that, uploaded file no longer exists in temporary directory. Just use rename() function to move that file from $workDir."/".$tmpName to final destination. // moves file from workdir to final destination rename($workDir."/".$tmpName, $_POST['filetype'].'/'.$rightname);

Categories : PHP

Why is directory name which contains dot(s) in the end is treated as a directory even if doesn't exists using File object in Java?
This is unrelated to Java, it's a Windows thing: Trailing dot(s) are removed from file and folder names. Even C/C++ programs can't do it. As a workaround, try to use the prefix \?: File dir = new File( "\\?\" + path ); But this will disable a lot of other things like relative paths and slash conversion. Related answers: How to create a filename with a trailing period in Windows? MSDN Naming Files, Paths, and Namespaces Why doesn't Explorer let you create a file whose name begins with a dot?

Categories : Java

Can't read file content from a directory created by CREATE DIRECTORY statement
Possibly been overthinking this... the bfile example should have indicated what's happening, but this assumes that your original question is slightly wrong and you're actually seeing: XML_DATA -------------------------------------------------------------------------------- (XMLTYPE) The type being shown in brackets for both queries suggests you're running this in SQL Developer; SQL*Plus hows the actual text rather than the type. If that is the case, to show the contents you can use the GETSTRINGVAL method: SELECT XMLTYPE(bfilename('TMP', 'tmp.xml'), nls_charset_id('UTF8')).getstringval() xml_data FROM dual; ... or if the XML is more than 4000 characters the GETCLOBVAL method. If you're inserting the value i

Categories : Oracle

Error at checking if directory exists | compiler says directory not found
If you wouldn't mind, copy paste some of the code into the question. But I would suggest (since I won't click the link to look at, I'm not sure if you're doing this already), that you use: if(!Directory.Exists("your path") Post your code here and I can maybe provide a better solution if this is what you are already using. Also this post describes another user with this problem. StackOverflow Question EDIT... if (!Directory.Exists(newclientgame)) { System.IO.Directory.Delete(newclientgame, true); } This if statement says, if the directory specified by the path "newclientgame" does not exist, then I should delete it. Are you sure this is the functionality you want? It might be too late for me to be thinking logically but I feel you have it backwards. I think you w

Categories : C#

Copy files from source directory to target directory and exclude specific file types from specified directories
This is one way to do it $SourceDirectory = 'C:Source' $DestinationDirectory = 'C:Destination' $ExcludeExtentions = '*.txt*', '*.xml*' $ExcludeSubDirectory = 'C:Sourcead_directory1', 'C:Sourcead_directory2' Get-ChildItem $SourceDirectory -Recurse -Exclude $ExcludeExtentions | Where-Object { $ExcludeSubDirectory -notcontains $_.DirectoryName } | Copy-Item -Destination $DestinationDirectory Your best friend here is Where-Object, or where. It takes a scriptblock as parameter and uses that scriptblock to validate each object that goes through pipeline. Only objects that make script return $true are passed through Where-Object. Also, take a look at the object that represents a file you get from Get-ChildItem. It has Name, Directory and DirectoryName containing pieces of file's FullNam

Categories : File

Cannot upgrade SVN - Can't open directory ./svn/text-base No such file or directory
I had this problem too, and svn cleanup didn't help. What I wound up doing was creating all the directories it complained about not finding (just a plain mkdir, nothing else), then running svn upgrade. That seemed to work. I switched to Git years ago, but this is a legacy project. I forgot how much Subversion annoys me by comparison. :P

Categories : Svn

Is it a good practice to have two views file? One in the website directory and one in the app directory
It is better to make views as a package and then put the two files in there. Example - myapp/ - views/ - __init__.py - first.py - second.py and in __init__.py from .first import A, B from .second import C, D Nothing stops you from having 2 view files, but it becomes very unmanagable after a while. By creating a package, you have all views related code at one place, and easy to extend if need be.

Categories : Django

What errors do I have in my php code to create a new directory and then save a file in that new directory
Compare, what you assign to $dirStructure and $file. You can notice lack of leading / in fopen parameter. Nevertheless, echo('folderName/'.$trimmedInputA.'/'.$trimmedInputA.$inputB.$inputC.$inputD.'.csv'); would certainly help you to debug.

Categories : PHP

After I deleted a directory, it always prompts "shell-init error retrieving current directory getcwd solve" when log on bash
When opening a new shell or xterm, it's started in the working directory of the process that started it. If you e.g. cd /proc && xterm, the new terminal will place you in /proc. Whatever's starting your terminal had positioned itself in /home/desktop/zeno, and now all the terminals are trying to start there. If you make that process change directory (by rebooting, for example), the terminals will start in a directory that exists and you will no longer get this error.

Categories : Linux

How to copy an image file from iOS Photo Library (ALAssetsLibrary) to the local directory of an App?
Try with following Code ALAssetsLibrary *assetLibrary=[[ALAssetsLibrary alloc] init]; [assetLibrary assetForURL:YourURL resultBlock:^(ALAsset *asset) { ALAssetRepresentation *rep = [asset defaultRepresentation]; Byte *buffer = (Byte*)malloc(rep.size); NSUInteger buffered = [rep getBytes:buffer fromOffset:0 length:rep.size error:nil]; NSData *data = [NSData dataWithBytesNoCopy:buffer length:buffered freeWhenDone:YES];//this is NSData may be what you want [data writeToFile:photoFile atomically:YES];//you can save image later } failureBlock:^(NSError *err) { NSLog(@"Error: %@",[err localizedDescription]); } ]; For get Image In document directory NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDo

Categories : IOS

The path is not valid. Check the directory for the database. - SDF file is in the local drive - C#
you missed one connectionStr = "c:\temp\s1234-1234\mydatabase.sdf" Or use connectionStr = @"c: emps1234-1234mydatabase.sdf" try something like below string sdfPath = @"c: emps1234-1234mydatabase.sdf"; var _connectionString = string.Format("Data Source = {0}; Password = {1}", sdfPath, password); using (SqlCeEngine en = new SqlCeEngine(_connectionString)) { en.CreateDatabase(); } return true;

Categories : C#

git move file and directory into a sub-directory along with commit history
To add to bmargulies's comment, the complete sequence is: mkdir -p x/p/q # make sure the parent directories exist first git mv x/* x/p/q # move folder, with history preserved git commit -m "changed the foldername x into x/p/q" Try it first to see a preview of the move: git mv -n x/* x/p/q Wolfgang comments: If you're using bash, you can avoid the issue of trying to move a folder into itself by using an extended glob like so (using the shopt built-in): shopt -s extglob; git mv !(folder) folder

Categories : GIT

How to add a file thats copied from one directory to a folder in another directory thats incremented
I would recommend using time stamps rather than sequential numbering. Also here is everything in one command and it is user independent. @xcopy "%LocalAppData%GoogleChromeUser DataDefaultookmarks*" "%UserProfile%DesktopBackup of Bookmarks\%Date:~10,4%-%Date:~4,2%-%Date:~7,2%" /I /Y This will copy both the bookmarks and bookmarks.bak file to a time-stamped folder inside the Backup of Bookmarks folder.

Categories : Batch File

create a tar.gz of a directory and clean up the directory except a file?
This should work: tar -zcvf dir.tar.gz --exclude="*.gz" ./dir/. && find ./dir/. ! -name "*.gz" -exec rm -rf {} + Test: $ tree -if . . ./dir ./dir/dir2 ./dir/dir2/file3 ./dir/file1 ./dir/file2 ./dir/myfile.gz 2 directories, 4 files $ tar -zcvf dir.tar.gz --exclude="*.gz" ./dir/. && find ./dir/. ! -name "*.gz" -exec rm -rf {} + ./dir/./ ./dir/./file1 ./dir/./dir2/ ./dir/./dir2/file3 ./dir/./file2 rm: cannot remove `.' or `..' $ tree -if . . ./dir ./dir/myfile.gz ./dir.tar.gz 1 directory, 2 files

Categories : Linux

Find file within directory and delete the directory its in
%~dp1 can be used to convert a file param to a drive and path. Quote the output as it doesn't convert to 'safe' path names. SS64 is a great resource for learning command scripting.

Categories : Batch File

How to copy/cut file(s) from one directory and sub directory and paste into another
Here you can find everything you need: http://docs.python.org/3/library/shutil.html Copying whole directory: shutil.copytree(src, dst, symlinks=False, ignore=None) Deleting whole directory: shutil.rmtree(path[, ignore_errors[, onerror]]) Moving directory: shutil.move(src, dst) Example code, that does what you want: import shutil shutil.copytree("C:UsersDesktop est", "C:UsersDesktop ew_test")

Categories : Python

How to copy file from directory to another Directory in Java
Use Apache Commons FileUtils FileUtils.copyDirectory(source, desc);

Categories : Java

input file in directory which is not in same directory as script being run
You could add code like this to your module1: if __name__ == '__main__': import os calc(os.getcwd()) Since you can import the module from anywhere, if you now do python -m module1 then the __main__ code will run in that directory.

Categories : Python

Console error "error opening trace file: No such file or directory (2)" in Android monitor when running on actual device
The error message comes from the systrace code. It indicates that your device doesn't support systrace tracing. You can ignore it.

Categories : Android

403 error just for directory, and not files in the directory
Assuming you are using Apache, you should disable directory browsing in the config. Find your httpd.conf (likely at /etc/apache/httpd.conf), and remove 'Indexes' from a line that will look like this: Options Includes Indexes FollowSymLinks MultiViews so that it looks like this: Options Includes FollowSymLinks MultiViews Then restart Apache. BTW, that kind of question is better asked here instead: http://webmasters.stackexchange.com/

Categories : Image

Linux: Move log files from a mounted dir to a local dir recursively while maintaining directory structure in local direcoty
How about something like rsync -azrR --include='*.log' -f 'hide,! */' /media/primary /backup If you use man rsync and type 2343g it should take you to the line where it explains this filter. Basically it will hide everything that's not a directory (every file) from the pattern matching; however, since I've used the --include='*.log' flag as well it will override that and the pattern will match only .log files. You can also use the -nv flag to do a dry run and see what would happen.

Categories : PHP

How to change the current working directory to a specific directory and execute a program under the specific directory?
One of your principal problems is that you don't capture the return value (output) of the command in backticks. You are merely throwing away the output you want. Do something like: my $output = `perl ./script.pl` system("perl ./script.pl")

Categories : Perl

Python - exec(open('file.py').read()) reports error - No such file or directory. 'file.py'
open('xyz') does not search the various python import paths. If you give a relative path name, it starts with the current working directory, appends your path and looks there. If you give an absolute path, it ignores the current directory.

Categories : Python

What do I do to make a python script that can run from any directory: the script file doesn’t have to be in the same directory as the .csv files?
Assuming you mean to include a fixed CSV file with your code, store an absolute path based on the script path: HERE = os.path.dirname(os.path.abspath(__file__)) csv_filename = open(os.path.join(HERE, 'somefile.csv') __file__ is the filename of the current module or script, os.path.dirname(__file__) is the directory the module resides in. For scripts, __file__ can be a relative pathname, so we use os.path.abspath() to turn that into an absolute path. This means you can run your script from anywhere. If you meant to make your script work with arbitrary CSV input files, use command line options: import argparse if __name__ == '__main__': parser = argparse.ArgumentParser('CSV importer') parser.add_argument('csvfile', type=argparse.FileType('w'), default

Categories : Python

LogCat error Error opening trace file: no such file or directory
Its a system level error log and it does not affect execution of your application, so you don't have to worry about it. Generally Its occurs Jelly Bean (android 4.1).And mainly its because of some SD-card issue.

Categories : Java

fatal error: ll.h:No such file or directory
If you include something and write it with <> the preprocessor is searching in external libraries like the std library. Similar to what you did here: #include <iostream> But if you include your own .cpp or .h files use "" so it will search in your local directory. Therefore, use in this case: #include "ll.h"

Categories : C++

there is an error QApplication: no such file or directory
I see include_directories() several times. I never tried this, so I don't know if you add to the include path this way or just overwrite the path again and again. Try: include_directories( ${PROJECT_SOURCE_DIR}/src ${PROJECT_SOURCE_DIR}/src/gui ${QT_INCLUDES} ${CMAKE_CURRENT_BINARY_DIR} #more includes if necessary ) Especially add ${QT_INCLUDES} in include_directories.

Categories : Qt

Xcode: no such file or directory error
The compiler won't scan your whole hard disk for included files recursively (unless you ask it to -- but don't! :). You need to help it out. Otherwise, your builds would take ages. One way is to specify the path to these sources using the Xcode build setting HEADER_SEARCH_PATHS or USER_HEADER_SEARCH_PATHS. So you tell Xcode to add the directory that contains FMWrapper/ to the search paths. Xcode Build Setting Reference

Categories : Xcode

Systrace error - No such file or directory
I think you added the path of adb instead of the path of the directory that containing adb. See http://stackoverflow.com/a/11851028/2225682 .

Categories : Android

Autoload Error: No such file or directory
You have to load vender/autoload.php, which will autoload that file for you: require_once __DIR__ . '/vendor/autoload.php'; This is assuming that your file is located at the same directory level as the vendor directory. Otherwise, adjust.

Categories : PHP



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