Search Results

Search found 72370 results on 2895 pages for 'file moving'.

Page 129/2895 | < Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >

  • How get file path from std::ifstream in c++

    - by Nilesh Shinge
    Hi All I am opening file using C++ function std::ifstream. I may open file using relative path (file.txt) or absoulte path (C:\test\file.txt). As I am passing string as file name, dont know whether it is relative or absolute path. Can any body tell me how to get absolutre path after file has been successfully open using std::ifstream function. e.g. std::ifstream file(strFile); // strFile = "file.txt" or strFile = "C:\test\file.txt" I want absolute path after file open successfully. Thanks Nilesh

    Read the article

  • Find&Replace using Python - Binary file

    - by Aaron Hoffman
    Hello, I'm attempting to do a "find and replace" in a file on a Mac OS X computer. Although it appears to work correctly. It seems that the file is somehow altered. The text editor that I use (Text Wrangler) is unable to even open the file once this is completed. Here is the code as I have it: import fileinput for line in fileinput.FileInput("testfile.txt",inplace=1): line = line.replace("newhost",host) print line, When I view the file from the terminal, it does say "testfile" may be a binary file. See it anyway? Is there a chance that this replace is corrupting the file? Do I have another option for this to work? I really appreciate the help. Thank you, Aaron UPDATE: the actual file is NOT a .txt file it is a .plist file which is preference file in Mac OS X if that makes any difference

    Read the article

  • HTTP(S) based file server

    - by Michael
    I've got a server running Ubuntu 10.04. I've already gotten openssh for ssh and sftp on it. I've been looking for a web-based (http, or preferably https) file server, perhaps a web-front-end to an (S)FTP server, that allows access to a specific folder, and also allows uploads. It requires user authentication, preferably using PAM. This web-based solution is for users that are not allowed to use FTP software / browser extension and don't have flash / java browser plugins within their corporate environments. So far I have looked into: Webmin: Includes a file manager, however it uses Java, and I'm looking for a plugin-free implementation. Apache2: I was able to set up https and PAM authentication, but the barebone implementation doesn't include file upload (as far as I'm aware of). HFS: Haven't tried it out because it is for Windows/wine only, and I don't want to run it under wine.

    Read the article

  • Newbie needs to learn basic file management

    - by Leo in NJ
    I have been using Ubuntu for abut 2 weeks and and still frustrated by simple file operations. I want to find a file called 9.jpg. Every internal command 3-rd party program I have tried also gives me 99.jpg, 999.jpg, lovepotion number9.jpg and a zillion other similar ones. How do you search for an EXACT file name WITHOUT wildcards? This is only my most recent frustration. I'm obviously missing something basic. good tutorial anywhere?

    Read the article

  • Determining filetype of file in assets folder

    - by ChaimKut
    Question: How do you programmatically distinguish between directories and regular files in the assets folder? When using AssetManager to access files in the assets folder, it seems impossible to determine if a file is in fact a file or a directory. You get the list of files from the list method and then open the file using the open method. I thought perhaps using the openFd method to get the asset file descriptor (and then subsequently requesting the normal file descriptor) would provide me some information. But requesting the file descriptor for a directory results in an IOException (which makes sense since what would it mean for a directory to have a file descriptor...?). Currently I'm relying on that IOException (resulting from attemptng to open a directory in the assets folder) in order to determine if a file is in fact a directory. (Opening a regular file works just fine). This seems like a bad idea. Any other suggestions to distinguish between a file and a directory?

    Read the article

  • how to change dolphin's select region of a file/folder (in detail view mode)

    - by Daniel
    Since nautilus has removed the dual pane. So I turn to dolphin. I am wondering how to change the default select behavior in detail view mode? Now to select a file/folder, my cursor has to hover over that file/folder and then the left click will take effect, but I much prefer the nautilus way, that is as long as your cursor is in the same row of that file/folder, left click picks up that item. This I think is more robust for user selection, it is faster. Any ideas how to achieve this in dolphin?

    Read the article

  • php file upload problem [closed]

    - by newcomer
    This code works properly in my localhost. I am using xampp 1.7.3. but when I put it in the live server it shows Possible file upload attack!. 'upload/' is the folder under 'public_html' folder on the server. I can upload files via other script in that directory. <?php $uploaddir = '/upload/';//I used C:/xampp/htdocs/upload/ in localhost. is it correct here? $uploadfile = $uploaddir . basename($_FILES['file_0']['name']); echo '<pre>'; if (move_uploaded_file($_FILES['file_0']['tmp_name'], $uploadfile)) { echo "File is valid, and was successfully uploaded.\\n"; } else { echo "Possible file upload attack!\\n"; } echo 'Here is some more debugging info:'; print_r($_FILES); print "</pre>"; ?>

    Read the article

  • Problem opening .sh file

    - by Lautré
    I'm trying to install Torchlight from the Humble Indie Bundle 6. The installation file is an sh file. When I try to run the sh file I get this output. [ user@pc:~/Desktop$ sudo sh ./Torchlight-2012-09-26.sh [sudo] password for user: Current temporary directory (usually /tmp by default) does not seem to be executable! Please specify an alternative path by using the --target option.] How do make the tmp dir executable or specify an alternate path? I'm running ubuntu 12.10

    Read the article

  • Unable to remove a file which have a name like a command argument

    - by Justin
    By inadvertance, I've created a file called -r into my home directory. Please don't ask me how and why, I don't recall. But the fact is that now I cannot get rid of it : rm -rf rm: missing operand Try 'rm --help' for more information. Other try : rm /-/r rm: cannot remove ‘/-/r’: No such file or directory Another one : rm \-r rm: missing operand Try 'rm --help' for more information. Is there a way to remove this file without deleting the whole directory ? Thanks.

    Read the article

  • How to make read-only file system writable?

    - by Tim
    I am not sure since when the filesystem on my digital audio player has been changed to be read-only. I cannot copy files into it or remove files on it. Are there some possible reasons for the player's file system to change the permission of its file system? I tried chmod: $ sudo chmod a+rw SGTL\ MSCN/ chomd: changing permissions of `SGTL MSCN/': Read-only file system where "SGTL MSCN" is the mounted point of the digital audio player. I was wondering how to make it writable? Thanks and regards!

    Read the article

  • How to remove text from file icons ?

    - by Jesse
    I am fairly new to Ubuntu (Linux). I noticed when creating a .java file or .py gives me an icon, however when I start writing code it overrides the thumbnail into showing text. Is there a way to disable this silly feature ? When I installed Linux Mint on the VM I noticed I was able to accomplish this task by unchecking "Show text in icon". I know they use Namo as their file manager. I read this thread and it did not work. How to stop Nautilus from creating thumbnails of specific file types?

    Read the article

  • Split large file, have arbitrary start index number

    - by nEJC
    I do a lot of file manipulation on my system and in one particular batch job I end up with around 16 Gb file. I need to prepare this data into smaller chunks for another process. I split it into 10k lines per file and numeric index, padded to 5 digits split -a 5 -d -l 10000 large_input_file /out_path/out. This way I end up with files named out.00000 out.00001 ... The problem is that this way indexing always starts with 0. Is there a way to set it to arbitrary starting index? man reveals nothing ...

    Read the article

  • Enable 'mod_rewrite' Using .htaccess File On cPanel Shared Hosting Server

    - by zulhfreelancer
    I'm using cPanel to host my website. I need to enable 'mod_rewrite' on this Shared Hosting cPanel account to run my script. I've tried to Google the solutions high and low but did not find any luck yet. Those tutorials that I found only work well with VPS and some of them said that, only hosting provider can change and enable it. But, some of them said that, it can be done easily by editing the .htaccess file. My question: If I want to edit the .htaccess file, what should I include in that file? What the 'rules' and 'conditions' that should be included?

    Read the article

  • Can't copy file (I/O error) Ubuntu Server

    - by QxQ
    I'm running Ubuntu Server 12.04, and basically found out that a couple of files aren't behaving like they should. The file name is r.-1.-1.mca, and I've tried using this terminal command sudo cp r.-1.-1.mca ../ The hard drive is working/thinking for a while, then spits this back out: cp: reading `r.-1.-1.mca': Input/output error cp: failed to extend `../r.-1.-1.mca': Input/output error I have another file behaving like this. My guess is that these files are corrupt, so I tried running the server in recovery mode and it told me to check the file system. However, it didn't come up with any errors. Is there a way to repair these files so I can use them normally again?

    Read the article

  • Is asking for control totals on a file an outdated means of verifying a file?

    - by CTKeane
    I'm in a new position where I need to process a flat files on a regular basis. The last time I did this was 5 or 6 years ago but as part of the file layout I received control totals. It gave me simplistic information on the file like the total number of records as well as sums of the important fields. This helped me during testing then also during production to verify the file arrived and has correct information. I have asked for similar data for this new project and have hit a wall of no. Is this no longer a standard practice? Is there a better way?

    Read the article

  • which one consume less resources? opening text file or make an sql query,both a thousand times ?

    - by imin
    hi I've a php website which displays recipes www.trymasak.my, to be exact. The recipes being displayed at the index page is updated about once a day. To get the latest recipes, I just use a mysql query which is something like "select recipe_name, page_views, image from table order by last_updated". So if I got 10000 visitors a day, obviously the query would be made 10000 times a day. A friend told me a better way (in terms of reducing server load) is when I update the recipes, I just put in the latest recipe details (names,images etc) into a text file, and make my page instead of querying a same query for 10,000 times, just get the data from the text file. Is his suggestion really better? If yes, which is the best php command should I use to open, read and close the text file? thanks

    Read the article

  • How to import .class file in a .java file?

    - by Namratha
    Hi, What i need to do is as follows: I have a bigloo scheme program (*.scm), then using the bigloo frameworks jvm a class file is generated. I want to use this .class file from a .java file. That is, i need to import this(.class) file as i want to use some functions defined in the scheme file which is now a .class file. How do i do it in Eclipse? i have created two packages one for java and one for the .class file. Then i import the package containing the .class file. But i am not able to use the function in the .class file in the .java file. Are there any settings to be done? Please let me know how this can be done.

    Read the article

  • hosts file ignored, how to troubleshoot?

    - by Superbest
    The hosts file on Windows computers is used to bind certain name strings to specific IP addresses to override other name resolution methods. Often, one decides to change the hosts file, and discovers that the changes refuse to take effect, or that even old entries of the hosts file are ignored thereafter. A number of "gotcha" mistakes can cause this, and it can be frustrating to figure out which one. When faced with the problem of Windows ignoring a hosts file, what is a comprehensive troubleshoot protocol that may be followed? This question has duplicates on SO, such as hosts file seems to be ignored, HOSTS file being ignored, /etc/hosts file being ignored as well as numerous discussions elsewhere. However, these tend to deal with a specific case, and once whatever mistake the OP made is found out, the discussion is over. If you don't happen to have made the same error, such a discussion isn't very useful. So I thought it would be more helpful to have a general protocol for resolving all hosts-related issues that would cover all cases.

    Read the article

  • Dreamweaver not loading due to workspace file problem

    - by Lynda
    I went to launch Dreamweaver CS 5.5 and this message popped up: XML parsing fatal error: Invalid document structure, line 1, file C:\Documents...(file path)...Workspace\My Workspace.xml It was followed by The following panel layout is missing or could not be read: C:...My Workspace.xml The application will not have a correct layout. Please load one from WindowsWorkspace After that, Dreamweaver acted as if it was going to load, but never did. When I tried to close the program, it crashed. I followed the file path and I saw two files: My Workspace.xml 0kb and My Workspace 5kb. The second one has an unknown file type. I deleted the first file and renamed the unknown file type to My Workspace.xml; everything worked fine after that point. Why did Dreamweaver do this? This has happened several times, but I have not changed anything that should affect that file type.

    Read the article

  • How to uncompress a 9GB file in Windows FAT32

    - by Kashif
    I have a 2GB RAR file that contains a 9GB video file. I'm using a FAT32 file system. Now I want to unzip that file but after 4GB I get an error due to the FAT32 file size limit. Now I want to know that how I can extract that video? I know that one way is to convert my partition to NTFS but I don't want to follow that way. I've also tried 7-zip but that again gives error after 4GB. One other way is to split that file but I don't know how I can split a video file that is zipped. So any idea please? How can I get rid of this problem.

    Read the article

  • Why does a zip file appear larger than the source file especially when it is text?

    - by PeanutsMonkey
    I have a text file that is 19 bytes in size and having compressed the file using zip and 7zip, it appears to be larger. I had a read of the question on Why is a 7zipped file larger than the raw file? as well as Why doesn't ZIP Compression compress anything? but considering the file is not already compressed I would have expected further compression. Attached is a screenshot. EDIT0 I took the example further by creating a file that contained random data as follows dd if=/dev/urandom of=sample.log bs=1G count=1 and attempted to compress the file using both zip and 7zip however there were no compression gains. Why is that?

    Read the article

  • Apache2 server does not start cannot pen shared object file

    - by sid__
    I am working with Apache and Passenger for a Rails project. And a during a restart I got the following error Cannot load /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so into server: /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so: cannot open shared object file: No such file or directory However there is no change in the apache configuration file. I have attached the snippet from the conf file 287 LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so 288 PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-2.2.11 289 PassengerRuby /usr/bin/ruby1.8 I am also unable to locate the shared object file in the location pointed to by the server though I am not really sure how the .so file is works (created/destroyed) I would also appreciate it if someone could explain to me what exactly has happened. I understand the shared object file is mission, what could be the reason it got deleted.

    Read the article

  • How to Unblock Previously Unblocked CHM File

    - by OnesimusUnbound
    Wierd? Anyway, on Windows 7, I've downloaded a CHM file on the desktop and unblocked it by Property > Unblock. I moved the CHM file to a folder on the desktop to organize the files, and when I opened the file, the content of the CHM reader couldn't open the pages in the CHM file. I've open the file property, but the unblocked button is gone. Well, I can simply download the file, though I find the problem interesting and I need to know how to troubleshoot it. So, how can I unblock the said file? Update Clarified location. I was referring to a folder in the desktop, not in network drive.

    Read the article

  • mini-dinstall chmod 0600 changes file: Operation not permitted

    - by V. Reileno
    I'm getting "Operation not permitted" in the mini-dinstall.log everytime a new debian package has been uploaded on the custom debian repository using dput. The deb file is installed successfuly but the changes file remains in the incoming folder. I can not use a post-install script when the changes file can not be processed. How can I fix this problem? Traceback (most recent call last): File "/usr/bin/mini-dinstall", line 780, in install retval = self._install_run_scripts(changefilename, changefile) File "/usr/bin/mini-dinstall", line 826, in _install_run_scripts do_chmod(changefilename, 0600) File "/usr/bin/mini-dinstall", line 193, in do_chmod do_and_log('Changing mode of "%s" to %o' % (name, mode), os.chmod, name, mode) File "/usr/bin/mini-dinstall", line 176, in do_and_log function(*args) OSError: [Errno 1] Operation not permitted: '/srv/debian-repository/mini-dinstall/incoming/debian-repository_1.3_amd64.changes' The mini-dinstall permissions: ls -lad incoming/ drwxrws--- 2 mini-dinstall debian-repository-uploader 4096 Jun 6 11:45 incoming/ ls -la incoming/debian-repository_1.3_amd64.changes -rw-rw---- 1 uploader-user debian-repository-uploader 1322 Jun 6 11:43 incoming/debian-repository_1.3_amd64.changes groups uploader-user uploader-user : uploader-user adm users debian-repository debian-repository-uploader puppet-client-updater groups mini-dinstall mini-dinstall : mini-dinstall debian-repository-uploader Cheers and thanks V.

    Read the article

  • MPlayer refuses to generate mono wav file

    - by JCCyC
    I want to downsample an existing audio file to 8KHz mono. This command line downsamples it to stereo: mplayer -quiet -vo null -vc dummy -af volume=0,resample=8000:0:1 -ao pcm:waveheader:file="/tmp/blah1.wav" ~/from_my_cellphone.3ga It generates a file that the file utility identifies as stereo: $ file /tmp/blah1.wav /tmp/blah1.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, stereo 8000 Hz Now, if I read the documentation correctly, I should add pan=1:0.5:0.5 so I get a file that's half the size: mplayer -quiet -vo null -vc dummy -af volume=0,resample=8000:0:1:pan=1:0.5:0.5 -ao pcm:waveheader:file="/tmp/blah2.wav" ~/from_my_cellphone.3ga But it doesn't! blah2.wav is identical to blah1.wav! What am I doing wrong?

    Read the article

< Previous Page | 125 126 127 128 129 130 131 132 133 134 135 136  | Next Page >