please help me (:
i want upload my files on one drive ...
and then download them by **name **by unity from one drive (:
can you help me ? (:
I don't know exactly what to do ):
I just want to download from One drive based on the name I give to the app (:
Related
I am currently working on a basic chatroom system for my college using text files, allowing everyone to save chatrooms in their area and share them with others. For this to work I need to get the actual directory of each users file on the server and not their local (relative) directory.
My college has a layout of each users E:\ drive being equal to \ServerName\Student\ (StudentNameHere)\
and in the past I have just been using .Replace("E:\","\\ServerName\Student\"+Enviroment.Username +"\")
But upon finding out that my college has different locations such as instead of Student lets say Student1, it makes my code more prone to breaking.
I have tried using
Path.GetFullPath(<File in this Users Directory>);
But it's only returned the path relative to users directory and not to the server, I don't know the type of link they used, but I thought symbolic would be good practice, tho trying this same command again on my own pc which I know has junction links for visual studio source/repos, didn't mention it's true (absolute) path either, any help on this would be much appreciated as this will fix a lot of bugs in my code and hopefully be a clean way to fix it all up as well, Thank You.
Thanks To #KevinGosse (https://stackoverflow.com/users/869621/kevin-gosse)
The problem I was having was Server Based and the link you commented did help, Thank You
I couldn't test this until today because I needed server access but it works like a charm, Thank You.
How do I determine a mapped drive's actual path?
Sorry I'm completely new to Unity so I'm probably asking a stupid question. How would I play a video content from a different computer? I know that I would have to establish the remote access connection to access the specific video file located in another computer and then use the filepath of the stored video as the sourcepath to play the video from.
I guess I'm not really sure of which function to use in Unity exactly. I saw posts about movietexture function in unity, but is there any other way or can I just pass in the filepath parameter to movietexture and it will automatically start playing from the source path? Thanks
After reading your comment, it looks like all you have to do is share the folder that contains the videos file in Ubuntu. This is how you Share the folder.
Usually to access a network file, you use double backlash followed by the computer name then the file directory.
\\computername\filepath\videofilename.mp4
To use this in a code you have to escape the \ by adding another one in front of it. One \ becomes \\ and two \\ becomes \\\\.
The url to use in your code should look something like this:
"\\\\servername\\filepath\\videofilename.mp4"
This post describes is how to play video in Unity. You have to download Unity 5.6 before you can use that.
Get the script then replace:
videoPlayer.source = VideoSource.VideoClip;
with:
videoPlayer.source = VideoSource.Url;
videoPlayer.url = "\\\\servername\\filepath\\videofilename.mp4";
Looking for a quick way of listing all currently installed steam games in c#. I've been using a method of checking the registry at the moment for installed apps, but if the user has their steam games on another hard drive and has swapped it into the machine then they won't be in the registry right?
So Looking for a way. Has anyone got any experience with the SteamAPI to point me in the right way if there is anything in there at all? Or any experience with this sort of thing?
Any help is appreciated.
Thanks.
If you already know the SteamApps directory, you can look at each appmanifest_1010.acf files in that directory. The numbers are the game's appid, and the file contains information about that game including its name and install path.
I've searched through the internet for how to move or copy'n'paste files on an Android device programmatically, but i found nothing up to now. what i wish to do is, that my application copies or moves a SQLite Database from the internal sdcard to the app folder in /data/data/example. i would be pleased if someone could explain my how to do that or give me a link to somewhere it gets explained.
A quick search on Stackoverflow turns out two questions with helpful answers:
How to make a copy of a file in android?
Android file copy
Basically, they suggest to read the contents of one file and write those to another file. You can do the same with monodroid.
i am trying to make a code which takes an image from a file path which i type in manually.
here is my code:
pieceImage = Image.FromFile(#"O:\Projects\imagename.png");
This code is saved on my USB flash drive.
However, whenever i run this code on a different computer, the path is different (obviously) and doesn't necessarily start with O:\ but something else, for example F:.
What can i use so that the path will change accordingly to the computer on which it runs? many thanks in advance.
You could get the drive letter based on the drive name, then build the Path to the file based on that (so only use the relative path from the root of the drive, no letter). See the DriveInfo class on MSDN and this question for a practical example of usage.
Of course, if the image is not on the USB drive, you will need to be more creative. But then I would recommand a different approach all the same, because there might be a design flaw in all this.
Assuming your program is in directory /Program/, include all images under your /Program/ directory, such as /Program/Images/. That way the images will be available no matter where the program is run.