Questions tagged [file-location]

94 questions
1
vote
0 answers

Replace string / content in Spark.staticFileLocation(path) before render

I am using Spark.staticFileLocation to serve multiple static HTML / CSS/ JS etc files and folders in resource/public and want to replace content within these files: staticFileLocation("/public"); Spark.after((request, response) -> { String…
drdoomgod
  • 11
  • 3
1
vote
3 answers

how can a target the current user's documents folder?

So we have a system that requires users to log in and it has there own roaming profile. So in this string of code how can i target the current users document folder? (FYI excel 2010) 'WORKAROUND: Dim PID As Double Dim strRootPath As String Const…
Daniel Roy
  • 105
  • 8
1
vote
1 answer

C# automatically open file location after downloading from ftp server

I had a C# homework which I have to make a download manager, I already completed it. This is my code: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using…
John Keane
  • 15
  • 1
  • 6
1
vote
1 answer

Parse DICOMDIR to get image filepaths

I'm trying to locate DICOM filepaths by parsing a DICOMDIR. But can't seem to figure out how to locate them. I parse through the DICOMDIR as follows: DicomDirectory dir = new…
TCulos
  • 183
  • 3
  • 13
1
vote
2 answers

MySQL(5.6) "select * into outfile.." not creating files

When I use this command on my local host as the root user it runs without issue but I can't seem to find the actual file. SELECT * INTO OUTFILE 'C:\...\tableName.txt' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' LINES TERMINATED BY…
TCulos
  • 183
  • 3
  • 13
1
vote
2 answers

Can an HttpServlet inside an uber jar send a page located inside the jar?

I'm writing a localhost web/websocket application bundled inside an uber jar. It's a single-page site, and the HttpServlet will send the html that communicates with the WebSocket server. I'd like the page to remain inside the jar and have the…
user1382306
1
vote
1 answer

How do I get formatted value of environment variable

In my webapplication I want to allow administrators to execute system commands like: Process proc = Runtime .getRuntime() .exec("cmd.exe /C dir C:\\\"Program Files…
1
vote
1 answer

how to change error logging location without modifying code in C# application?

I used Nlog for logging exceptions in my C# windows application and had a file called LogConfig.cs which has all the details about the location (path) and file name where to store these exceptions. Now if I want to change the location where these…
rookie_developer
  • 1,359
  • 3
  • 15
  • 27
1
vote
1 answer

Reliable way to get path to py file of a module

I'm trying to figure out the best way to reliably discover at runtime the location on the file system of the py file for a given module. I need to do this because I plan to externalize some configuration data about some methods (in this case,…
Silas Ray
  • 25,682
  • 5
  • 48
  • 63
0
votes
1 answer

Can You "Tag" a file in Vb.Net?

In Vb.Net is there any way to "tag" a file so if I was to change its location my program could still find it, without the user having to search for it? I am using: If Not System.IO.File.Exists(C:\Location\Folder\FileName.txt) Then…
0
votes
1 answer

Background images are not being referenced correctly

Ok, first off, I know that the code referenced below has to do with a Joomla! site, however, I have had this problem on more than one site, not all of them using the Joomla! framework. Now the problem: I have some background images that are being…
Chris
  • 439
  • 7
  • 16
0
votes
0 answers

Android: Store location of Raw files in array

I'm writing an app displaying html pages. By swiping or via a menu the different pages become visable. the html pages are stored ar R.raw.file1 R.raw.file2 It is switching between the files with ' switch case ' String myLoc[] = {"file1","file2"}; …
BarbetNL
  • 408
  • 2
  • 16
0
votes
1 answer

locating files in XNA(4.0)

I am currently working on a game project in XNA 4.0 we currently read our levels in by referencing .txt files (considered xml but .txt works fine) we are able to reference the levels as referenced files. as follows: LevelScreen.cs: private void…
gardian06
  • 1,496
  • 3
  • 20
  • 34
0
votes
1 answer

How can i save a access report to pdf with a variable name and let the user choose the location?

I want to save a access reports as a pdf with a specific name (get this from the form) but that the user still can choose the location where to save it. I can save the report with the standard name of the report, i can save the report with a…
Tommy
  • 3
  • 2
0
votes
1 answer

Writing a JSON file in a specific file location

I currently have a program that takes in a bunch of input parameters and outputs values in a Json in the downloads file when I click on my save JSON file. This is the code that I have right now for my save Button: saveBtn.addEventListener('click',…