How Do I Know Change Directory System Watcher? - vb.net

How do I change directory folder in system watcher?
I made a desktop app to upload file in database.
I set the root folder as C:\Users\x\Desktop\Test.
A user can copy/paste a file into that folder and that file will upload to database.
but sometimes, a user can upload not in that root folder. user can upload file to other folder in root.
Let's say in the root folder, there are folders called Hello and Hallo..
the user clicks on the folder Hello, directory change not C:\Users\x\Desktop\Test again but C:\Users\x\Desktop\Test\Hello
My question, how can I detect it?
Because system watcher can only handle created, changed, deleted, renamed. So I must change or create file first to get e.fullpath.
I want that if I click folder Hello, I get e.fullpath :)

Set the IncludeSubdirectories property on your FileSystemWatcher to true, e.g.:
fsw.IncludeSubdirectories = True
Ref: http://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher.includesubdirectories(v=vs.110).aspx

Related

Do I have to move my Dropbox folder to work with JupyterLab?

The File menu in JupyterLab has few options for saving and opening files. The menu items do let one browse the file system and search for a directory. For example, the File->Open from Path... menu item only allows entering a file on a path relative to /jlab/root. Questions:
What is the location of /jlab/root. Is there a command that shows it?
I like to keep files with code in a subfolder of my Dropbox folder. What do I do if my Dropbox folder is not a subfolder of /jlab/root?

Can not create a content hierarchy inside a shared folder

I followed the steps in this post successfully, but I cannot make a new text document inside the shared folder.
I can create a top level folders inside the the shared folder, but I cannot also browse the folder to create second level folders and so on!
--
Update 1
Screenshot of Folder's Browse page
Update 2
Screenshot of Folder's Copy of Browse page
Update 3
If we browse a folder from mike's My page ,like the one in below, we got a result as in the second screenshot
It is because the Folder content type has a separate custom Browse page and it is not the same as the one for the 'My page' which is a UserProfile. So if you want to make it work for folders:
Create a System Folder with the name (apps) into your 'shared folder' and a Folder in to the newly created (apps) folder with the name Folder
Copy the Browse page from the UserProfile folder (/Root/Profiles/(apps)/UserProfile) into the 'shared folder's (apps)/Folder folder
Change the list portlet on the Folder Browse page to display always the current folder (set CurrentContent as Bind Target and remove the path from the Custom Root Path input)
Check this article about sensenet smart application model which is strongly related to your question.

How to copy artifacts folder to ftp folder in TFS?

I'm trying to publish artifacts and it's other folders files as well.I've read all the docs file provide by microsoft from here and used them but none of them worked for me.
I' tried File patterns as
** =>which copied all root files to ftp
**\* => which copied all sub folders file to ftp's root directory.
What I've wanted is copy folder to folder in ftp aswell.
-artifacts ftp
--a.dll --a.dll
--subfolder --subfolder
---subfolder_1.dll ---subfolder_1.dll
what's happening is
ftp
--a.dll
--subfolder_1.dll
It's copying all sub directories file to root directory of ftp.
I've use curl and ftp both giving me same result.
How can i achieve folder to folder copy in TFS 2017.
It's not related File patterns, to upload the entire folder content recursively, simply specify **.
All you have to do is checking the Preserve file paths in Advanced option.
If selected, the relative local directory structure is recreated under
the remote directory where files are uploaded. Otherwise, files are
uploaded directly to the remote directory without creating additional
subdirectories.
For example, suppose your source folder is: /home/user/source/ and
contains the file: foo/bar/foobar.txt, and your remote directory
is: /uploads/. If selected, the file is uploaded to:
/uploads/foo/bar/foobar.txt. Otherwise, to: /uploads/foobar.txt.

How to save StorageFolder

I am creating a (sort-of) downloading manager for windows 8 as a metro app. I need to let the user pick his download directory.
So we can get a reference to a folder using the folder picker:
Windows.storate.Pickers.FolderPicker.pickSingleFolderAsync.then(function (folder)
{
//myFolder
folder
}
Now my question is how would I save this folder reference, so that I can still access it after the user closes the app?
There seems to be applicationData that we can use, but does that keep the folder permission in-tact?
I'm using HTML+JS, though since this is an API question it doesn't really matter.
The recommended way to keep track of the folder is to use the AccessCache APIs, which will keep track of the files and folders your app has been given permissions for from the pickers.
To store a folder in the cache:
var folder = //Get a folder from the picker
var storageItemAccessList = Windows.Storage.AccessCache.StorageApplicationPermissions.futureAccessList;
storageItemAccessList.Add(folder,"identifyingString");
And to get the same folder out of the cache later use GetFolderAsync with the identifying string that you used when you stored the folder.
Note that the folder will be kept in the cache even if it has been deleted on the disk. You will get a FileNotFound exception when you try and open it though.

No permissions to save QTP's Object Repositories on shared network folders

Whenever I try to save Object Repositories on my company's shared network folders, QTP complains by saying:
"You do not have the required permission to save in this folder. Do you want to save the file in the My Documents folder instead?"
Thing is, I do have permission to read and write on the folder to which I am trying to save. Moreover, I don't have admin privileges, so running QTP as Admin isn't possible. How can this be solved?
QTP is able to save to shared network folders AND it does have the permission to do it.
The trick is to use the full UNC path. This means that if you wanted to save the file GlobalStore.tsr inside of:
\\somewhere.corpnet.com\Groups\QA\Automation\Object Repository\
You would put in the 'File name' field the whole path:
\\somewhere.corpnet.com\Groups\QA\Automation\Object Repository\GlobalStore.tsr