I have an classic asp application where I would like to use Server.Transfer(path) so that the path points to asp-file that locates in the parent directory. I can only have Server.Transfer work for now only for asp-files that are either in the same directory as the calling asp-page or in child directories (using Server.Transfer("routine.asp") or Server.Transfer("./childfol/routine.asp")). I have been trying to find examples how to define path to asp files that are in parent folders - so far without any success, I only get the error: "0x80004005 - Server object: 006~ASP 0230~Server.Transfer Error~The call to Server.Transfer failed while loading the page."
Is it possible to use parents paths with Server.Transfer? - And if so how to define path. I have been trying many variations like: Server.Transfer("../parentpath/routine.asp")
And note that I have enabled parent paths in IIS!
Related
I'm using python to download an application from a content distribution network. The application downloads as self extract file cabinet. When executed it creates a directory using a version naming format. For example app-version2/../app.exe, Thus I cannot rely on the folder name as it may change in the future. I'm trying to find the best way to work with the content inside the folder without depending on the actual folder name.
My idea was to rename the folder using os.listdir() and then os.rename(app-version2, myapp) This would work but is not automated. What would be the best automated method to find a folder name that contains version numbers and change that to something more static?
Assuming you want to find the path of the directory which begins with app, you can accomplish this using pathlib.Path:
from pathlib import Path
app_path = next(Path().glob('app*'))
This will give you the path to the first file or directory in your current directory whose name begins with "app".
I Want Put those DLL files under a child folder.
the system is Win7 later.
like there is an opencv_world300d.dll , i need move it into my working directory (its ./),but i want put it under child folder( i.e. ./DLL/) .
Does anyone Know about this ?
The link specified describes DLL search order on windows.
You can copy the opencv_world300d.dll in a sub-folder ( /DLL) but then you have to modify PATH environment variable to include new directory.
I'm trying to replicate this hello world example with Haxe and HaxeUI.
When i compile the project everything seems fine but when i try to execute the swf from browser i have an error like: Cannot access a property or method of a null object reference referred to processXmlResource (in the root folder i have the main.hx and in a subfolder the xml).
Below is the screenshot of the error i get:
Have you modified your applications application.xml (or project.xml) to find the asset in your project root? Or put all your assets in an assets sub folder and let then reference that from you application.xml?
Basically it seems it is not finding your xml resource. This sample might be a good example of a basic project setup: https://github.com/ianharrigan/haxeui/tree/master/samples/hello_world_xml
Does anyone know how to get the full path of a DirectoryEntry object in a Chrome Packaged App, without any tildes or other shortcuts?
I am writing a Google Chrome Packaged App. My app has a button where a user can choose a directory using chrome.fileSystem API. When the directory choice comes back to my app, it is represented by a DirectoryEntry object, which is defined in the File API. The object looks like this in the console:
DirectoryEntry {
filesystem: DOMFileSystem
fullPath: "/to_read"
isDirectory: true
isFile: false
name: "to_read"
__proto__: DirectoryEntry
}
I am using Windows and the full path of the directory is
C:\Users\David\Desktop\to_read
I would like a function that can return that path or something close. Unfortunately, the closest thing I found is chrome.fileSystem.getDisplayPath, but that returns the following:
~\Desktop\to_read
The return value from getDisplayPath is not useful to me, because I want to get the full name of the directory (including the drive) so I can compare it to some other full directory paths I have.
I tried calling toURL() on the DirectoryEntry and it returned an empty string.
A bit about my project: I want to write an iTunes library synchronizer as a Chrome Packaged App. The iTunes library XML file contains full paths like file://localhost/D:/David/Music/Bob/Bob%20Album/01%20Bob.mp3. The user will give my app access to his music folders, and I want to be able to tell if he gave me access to the right folders.
The only full paths available are those returned by getDisplayPath.
The mediaGalleries API may be a better fit for your project: http://developer.chrome.com/apps/mediaGalleries.html#iTunes.
If you have a full path path/to/the/file.mp3 and you want to load the file directly with tis you can do it but the solution is not perfect. Use the chrome.mediaGalleries API to ask where the user saves his music (in your case), then you can write a loop who check if one of the path repository is equal to a gallery.
For example if you got a file path/to/the/file.mp3 from the xml file and your galleries list looks like ["D", "to", "Videos"], write a function to check if each component of the file's path is a gallery. In this case your code will find "to", so you can launch a second function who use "the/file.mp3".
The second function has to use the given path and find if the gallery contains the right folders and finally the right file (use this example by Google). In the case you're trying to find "the/file.mp3" with the gallery to your loop has to find a directory named "the" then "file.mp3" (write a recursive function), if you find the file open it, otherwise come back to the first function if you haven't check all the galleries or all the path's component.
This is currently (2014-01-10) not a feature of Chrome, but I have suggested it and they are working on it:
https://code.google.com/p/chromium/issues/detail?id=322952
Each test case saves results to a separate UITestActionLog.html file. But in the end of each test case I'd like to move that .html to a different folder and rename it.
Is it possible to do so in, say, [TestCleanup()]? If yes, then how can I programmatically get .html report location?
The TestContext class contains several fields with "directory" in their names. These can be used to access the various directories associated with running the tests.
As well as managing the files as asked by your question the TestContext class has an AddResultFile method. The Microsoft documentation on this mehod is not clear, but it seems that the files are saved for failing tests and discarded for passing tests.
To get the directory in which the UITestActionLog file will be located, use the TestContext.TestResultsDirectory Property. You can use below code to get the full path:
string fullPath = TestContext.TestResultsDirectory +"\" +"UITestActionLog.html";