directory

What makes a file into a folder? [closed]

瘦欲@ 提交于 2019-12-13 06:24:37
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . What is the (file system specific) difference between a file and a folder? Why are different methods in java.nio.file.Files required

How to get a specific folder with GetDefaultFolder and delete unneeded folders that it has created

泪湿孤枕 提交于 2019-12-13 06:15:19
问题 I was trying to figure out how to access my folders with a Python program (see this SO answer.) When I ran this: outlook = win32com.client.Dispatch("Outlook.Application") namespace = outlook.GetNamespace("MAPI") for i in range(50): try:print(i,namespace.GetDefaultFolder(i).Name) except:pass The above program revealed or created some folders that I cannot figure out how to delete, such as: Reminders the file so that changes to the file will be reflected in your item. RSS Subscriptions In

Create directory in C++

亡梦爱人 提交于 2019-12-13 05:53:38
问题 I'm making a simple game in DirectX and C++. But I want to create a directory in Documents for the settings etc. But I don't know how I need to do this? Can someone help me? 回答1: You can use Visual Studio's <filesystem> There is a function create_directory that has the signature template<class Path> inline bool create_directory( const Path& Pval ); You can find the user's Documents directory using SHGetKnownFolderPath which has the signature HRESULT SHGetKnownFolderPath( _In_ REFKNOWNFOLDERID

NSIS difficulty moving folders

最后都变了- 提交于 2019-12-13 05:44:19
问题 I have an installer that looks for old version, and as part of the uninstall process, backs it up in a folder. For backup, I have tried Rename (it sometimes fails), CreateDirectory then CopyFiles then delete them (time consuming, lots of files and directories), and have preferred to use Move Folder, where every function is replaced with its un-version (like .MoveFolder_Locate_moveFile -> un.MoveFolder_Locate_moveFile ). StrCpy $switch_overwrite 1 !insertmacro un.MoveFolder "$INSTDIR" "$BACKUP

Storage Access Provider - Creation of folder in authorized directory fails

大兔子大兔子 提交于 2019-12-13 05:33:46
问题 My app lets the user create a folder with the SAF picker and then wants to create a folder in it. This is how the picker is called: static public void openPickerForFolderCreation(Activity activity,int requestCode) { Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); intent.setType("vnd.android.document/directory"); intent.addFlags(Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION); intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION); intent.addFlags(Intent.FLAG_GRANT_WRITE_URI

How to parse a folder path with spaces in C code

和自甴很熟 提交于 2019-12-13 05:31:29
问题 I'm using this simple C code: char * command = NULL; sprintf (command, "ls %s", folderpath); system(command); The problem is when the folder name has a space in it... I know that in Unix I need to add a "\", for example ls my\ folder\ name How can I get around this ? Thank you! 回答1: Simple way out is to put the folder name inside single quotes - sprintf( command, "ls '%s'", folder ); . Watch out for command injection as @ndim reminds us. 回答2: Use fork() and exec*() instead. 回答3: If your

Struggling to open most recent .xls in specified folder. File Not Found error

风格不统一 提交于 2019-12-13 05:26:05
问题 This is my first post so I apologize if I fail to give enough information. I'll do my best. I am attempting to scan through a specific folder and open the most recently titled Excel file. The files are named '9 1 13' and '9 2 13' ect. My sub correctly steers itself to the right folder and identifies the most recent file. However, when I attempt to open it, I get a runtime error 1004. File '9 2 13.xlsx' could not be found, check spelling.... It clearly has found the right file and path to it,

Google Admin Api gives HTTP error 403: Not Authorized to access this resource/api

瘦欲@ 提交于 2019-12-13 05:25:08
问题 I'm trying to make an automation script for the Directory API to create Apps Users. I think I'm close because the below code runs to some extent: I can input the 'password' parameter but after that gets sent with the other params it crashes with this error: raise HttpError(resp, content, uri=self.uri) apiclient.errors.HttpError: https://www.googleapis.com/admin/directory/v1/users?alt=json returned "Not Authorized to access this resource/api"> And here is the script: import httplib2 import

Program cannot find image directory when run from IDE, but CAN when run from folder?

旧城冷巷雨未停 提交于 2019-12-13 05:15:38
问题 When I build, it succeeds with no errors. However, when I run from the IDE, I get an error (my image fails to load because it cannot find the directory). However, if I go into the folder and run the program(.exe) it finds the image directory perfectly. mTextures.Load(Textures::Background, "../GFX/Background.png"); ^the line of code giving the directory. I assume this is a problem with a setting I didn't enter correctly in my compiler? I am using Code::Blocks on Windows. 回答1: Your debugger's

Securing a web folder with out membership roles defined

陌路散爱 提交于 2019-12-13 05:09:48
问题 Our site is hosted on a shared server. We have a login module independent of any membership roles. We have not used this feature.Our login db table only has email id and pwd fields. One of our folders (General) contains sensitive documents: pdf; jpg; doc files etc. We do not want this folder to be accessed by unauthorized users as well as any search engines such as google, yahoo and others. We added the below lines in the web config <location path="General" allowOverride="true"> <system.web>