What is the difference between user variables and system variables?
What is the difference between user variables such as PATH, TMP, etc. and system variables? I accidentally deleted the user variable PATH. What am I supposed to do? 5 Answers 5
What is the difference between user variables such as PATH, TMP, etc. and system variables? I accidentally deleted the user variable PATH. What am I supposed to do? 5 Answers 5
Is there a way to extract the file name from the file full path (part of a file path) without the hassle of manipulating string? The equivalent in Java would be: File f = new File (“C:/some_dir/a”) f.getName() //output a f.getFullAbsolutePath() //output c:/some_dir/a 4 Answers 4
The standard predefined macro __FILE__ available in C shows the full path to the file. Is there any way to short the path? I mean instead of /full/path/to/file.c I see to/file.c or file.c 30 Answers 30
I have a little problem with ~ in my paths. This code example creates some directories called ~/some_dir and do not understand that I wanted to create some_dir in my home directory. my_dir = “~/some_dir” if not os.path.exists(my_dir): os.makedirs(my_dir) Note this is on a Linux-based system. 3 Answers 3
I looked in: C:\Documents and Settings\username\Local Settings\Application Data\Google\Chrome\User Data\Default\Extensions for unpacked extensions, but that folder is empty for me. For newer versions, where does Chrome store the files? 8 Answers 8
I have read several answers on how to set environmental variables on OSX as permanently. First, I tried this, How to permanently set $PATH on Linux/Unix? but I had an error message saying no such file and directory, so I thought I could try ~/.bash_profile instead of ~/.profile but it did not work. Second, I … Read more
I’m trying to save an image to a folder in .NET C# but I get this exception: Access to the path ‘C:\inetpub\wwwroot\mysite\images\savehere’ is denied.The error occured at mscorlib because at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, … Read more
I recently have been moving a bunch of MP3s from various locations into a repository. I had been constructing the new file names using the ID3 tags (thanks, TagLib-Sharp!), and I noticed that I was getting a System.NotSupportedException: “The given path’s format is not supported.” This was generated by either File.Copy() or Directory.CreateDirectory(). It didn’t … Read more
We are working with a code repository which is deployed to both Windows and Linux – sometimes in different directories. How should one of the modules inside the project refer to one of the non-Python resources in the project (CSV files, etc.)? If we do something like: thefile = open(‘test.csv’) or: thefile = open(‘../somedirectory/test.csv’) It … Read more
This question already has answers here: Android Gallery on Android 4.4 (KitKat) returns different URI for Intent.ACTION_GET_CONTENT (20 answers) Closed 7 years ago. Before the new gallery access in Android 4.4 (KitKat) I got my real path on the SD card with this method: public String getPath(Uri uri) { String[] projection = { MediaStore.Images.Media.DATA }; … Read more