File Location+Profile String
I have a program that needs to have a specified path to a to a file every time it runs. However I don't what to have the program ask for the location of that file every time it is run. Therefore what I need to do is to figure out a way that once the location of the file has been specified (the first tiem the program is run) then it will not ask for the location of the file and read it from some specified file. I know that in C++ they are called profile strings and they use *.ini files. I didn't know if there was some sort of similar thing java or what I needed to do. I know I can make a *.ini file manually but I didn't know if there was something specifically designed to do such a thing.
look at this http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html
particularly look at the methods load and store
Similar Messages
-
Using powershell to manipulate mapi profile and PST file locations
I have a situation whereby I need to move a bunch of PST files out of the default location in Office 2010 and change the mapi profile for the user so that the pst file location updated so the user doesn't experience any issues when launching Outlook.
My logic flow is as follows:
1.) locate All pst files referenced in the logged on users MAPI profile.
2.) Move these files to a another directory eg. c:\users\%username%\OutlookFiles
3.) Update the MAPI profile to point to the new location so that when the user launches Outlook he doesn't notice that the files have been moved.
I know how to copy the files using powershell etc. but how on earth do you query the MAPI profile to locate the pst files and then change each entry for a PST file to point to the new location.
Anyone got any ideas?What you are trying to do cannot normally be done with a script due to a whole host of reasons including differences in versions and lack of access to a users profile.
!. Are you on Exchnage?
2. Have you redirected the users folders with Group Policy yet?
Outlook OST files are not movable without the use of a third party tool. It is far easier to just have the users create a new profile.
PST files that are attached in a user session can be moved using a script that can be run by the user.
¯\_(ツ)_/¯ -
Camera Profile file locations?? CS4 64 bit
I have installed new Camera Profiles, beta 1 and beta 2
Now I need the file location to delete the beta 1 versions
Any help will be appreciatedWell, since the people who
created the profiles are active in that forum, I thought they might know where they put them! -
I asked about automatic backup of bookmarks and received the following answer:You can make Firefox 3 create an automatic HTML backup (bookmarks.html) when you exit Firefox if you set the pref [http://kb.mozillazine.org/browser.bookmarks.autoExportHTML browser.bookmarks.autoExportHTML] to true on the about:config page. That backup is created by default in the profile folder as bookmarks.html, but you can set the file name and path via the pref [http://kb.mozillazine.org/browser.bookmarks.file browser.bookmarks.file] on the about:config page. I went to about:config page and toggled browser.bookmarks.autoExportHTML to “Yes” and it’s working. However, I want to change the file location, but I can’t find browser.bookmarks.file in the list.
The browser.bookmarks.file preference does not exist by default. Right-click in about:config and select "New > String" to create it.
-
In 3.6.3 I'm unable to find the parent cache to change where the temp files are located. I have an SSD drive, and I need to get the temp file off, and onto my platter drive. I have read the previous fix of about:config and changing the parent cache location, but it no longer seems to be there. I'm unable to locate anything relating to my SSD drive location in about:config.
== User Agent ==
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.70 Safari/533.4Unfortunately, it appears that what I wrote about not being able to find the location IN about:config of the cache to change it from my C: drive to a different location, was mildly misunderstood that I didn't know how to get into about:config.
The location of browser.cache.disk.parent_directory does not currently exist in 3.6.3. I'm assuming it's under a different location. Also using the simple string of "cache" lists several options, but none of them appear to be where firefox is currently dumping the temp files onto my C:
I merely need to know how to switch the temp file location from 1 drive, to another. Not downloads, the temp file. -
Displaying File Location in iTunes
I can't seem to find a way to display my file locations in iTunes - I don't see it as a column that can be displayed. I'd like to be able to view this column to help with possible duplicate removal. I understand how to remove and even view the duplicates, but the missing piece is the actual location of the files, and I don't want to have to individually click on them to get that information or individually pull up the properties of each song. I'd greaty appreciate the help!
The following script (Download here, or copy and paste into a file with extension ".vbs") will set the Description of all the tracks in the playlist(s) you select to the file's path. Obviously if you want to see it you have to turn on the Description column
' # itunespathdescription.vbs
' # This script set the Description of all the files in a single playlist
' # to the file Path.
' # Copyright (C) 2008 Robert Jacobson
' # written by: Robert Jacobson (http://home.comcast.net/~teridon73/itunesscripts)
' # Last Updated: 2 Feb 2008
' # Version 1.0
' # This script is GPL v2. see http://www.gnu.org/copyleft/gpl.html
' # Change record:
' # 1 Script creation
Option Explicit
Dim iTunesApp ' iTunes.Application object used to access the iTunes application.
Dim tracks ' The tracks collection object of the Library object.
Dim FileList ' The list of files that have been copied.
Dim i ' A counter variable.
Dim Msg ' A string for a message.
Dim f ' A file object.
Dim sources
Dim source
Dim playlists
Dim playlist
Dim playlistName
Dim j
Dim m
Dim songName
Dim artist
Dim result
Dim listarray
Dim num
Dim k
Dim track
Dim numtracks
Set iTunesApp = CreateObject("iTunes.Application.1")
Set sources = iTunesApp.Sources
DIM use_windows
Dim Playlist_list
'detect CSCRIPT context & use InputLine
IF Instr(lcase(wscript.FullName), "cscript")>0 THEN
use_windows = 0
ELSE 'detect WSCRIPT context & use native InputBox
use_windows = 1
END IF
For i = 1 to sources.Count
Set source = sources.Item(i)
IF source.Kind = 1 Then
Set playlists = source.Playlists
if use_windows = 0 Then
For j = 1 to playlists.Count
Set playlist = playlists.Item(j)
playlistName = playlist.Name
Wscript.Echo j & ": " & playlistName
Next
Else
For j = 1 to playlists.Count
Set playlist = playlists.Item(j)
playlistName = playlist.Name
Playlist_list = Playlist_list & j & ": " & playlistName & Chr(10)
Next
End if
If use_windows = 0 Then
Wscript.Echo ""
Wscript.StdOut.Write "Enter comma-separated lists to process: "
result = Wscript.StdIn.ReadLine
Else
result = InputBox(Playlist_list & Chr(10) & "Enter comma-separated lists to process: ", "Which Playlist(s)")
End if
listarray = split(result, ",")
For k = 0 to UBound(listarray)
num = listarray(k)
Set playlist = playlists.Item(num)
playlistName = playlist.Name
If use_windows = 0 Then
Wscript.Echo ""
Wscript.Echo chr(9) & "Processing playlist " & num & ": " & playlistName
End If
Set tracks = playlist.Tracks
numtracks = tracks.Count
If use_windows = 0 Then
Wscript.Echo chr(9) & "tracks: " & numtracks
End If
For m = numtracks to 1 step -1
'If m > tracks.Count Then Exit For
Set track = tracks.Item(m)
'Wscript.Echo "num: " & numtracks & " Count: " & tracks.Count & " m: " & m
If track.Kind = 1 Then
FileList = track.Location
track.Description = FileList
End If
Next
If use_windows = 0 Then
Wscript.Echo "Finished processing playlist " & playlistName
End If
Next
'End If
End If
Next
The forum TOS requires me to say: "I may receive some form of compensation, financial or otherwise, from my recommendation or link" because I have a paypal donation link on my webpage. -
I would like to xfer some files from my macbook pro to my new imac desktop using airdrop. I get visibility of both computers using airdrop,
however all the files located in finder are hidden as soon as airdrop starts running.Hi paulo23,
''Would it make a difference if I would delete firefox altogether and try fresh?''
It could not be ruled out it may help.
A clean reinstall may solve the issue and so could be tried but not as a first step and take care with what you do.
#First I suggest you '''back up your current profile'''. <br />Do this before trying even a new profile. You want to make sure you do not lose data such as bookmarks passwords or settings, or if you do that you may recover them. Put the backup folders and files somewhere safe outside Firefox profile or program paths. (Your Desktop will do)
#* [[Back up and restore information in Firefox profiles]]
#Next just try a clean additional '''test profile'''. And when it comes to trying to print again use safe mode, and make sure any and all Firefox Plugins are disabled.
#* [[Use the Profile Manager to create and remove Firefox profiles#w_creating-a-profile]]'''_creating-a-profile'''
#* If you are new to using multiple Firefox profiles then because we do not document this in the Sumo KB (other than for Thunderbird) you may be interested in reading my tips in two adjacent posts [/questions/990973#answer-548376] & [/questions/990973#answer-548377]
#* Also see
#** An similar simpler alternative but you will lose any extensions <br /> [[Reset Firefox preferences to troubleshoot and fix problems]]
#**[[Troubleshoot Firefox issues using Safe Mode]]
#** [[Disable or remove Add-ons#w_how-to-disable-plugins]]'''_how-to-disable-plugins'''
# If that failed to help then it is worth trying a '''clean install''' of Firefox and that involves trashing the firefox ''Application'' (Windows: deleting the program files) NOT the Firefox Profile.
#* Full instructions see [[Troubleshoot and diagnose Firefox problems#w_5-reinstall-firefox]]#w_5-reinstall-firefox -
I've a file located at c:\java\config\help.txt
I'm using File input stream to read that file. I'm the running my class from c:\java\test\. The file location is hardcoded in the source as c:\java\config\help.txt
Is that a way that I could define simply cofig/help.txt rather then entire path. So in theory if I want to run my class in unix machines it would still work?
Thanks
TimDemo:
import java.io.*;
import java.net.*;
public class Test {
public static void main(String[] args) throws IOException {
URL url = Test.class.getResource("/"); //url of dir holding this class
URL url2 = new URL(url, "../config/help.txt");
InputStream in = url2.openStream();
BufferedReader r = new BufferedReader(new InputStreamReader(in));
String s;
while ((s = r.readLine()) != null)
System.out.println(s);
}I'm assuming that Test.class is in a dir that's a sibling to dir config (ie, these
two dirs are in the same parent dir). I had a bit of trouble going "up and over" to config,
hence the URL monkey business. Is there a cleaner solution, anyone? -
Problems with file location variables and Oracle 9i
I'm new to Oracle and I'm seeing if I can get Oracle 9i running and do anything useful for me on a Solaris 9 platform.
The installation of Oracle went OK except step three, creating a starter database. The installation wanted to put it on the same file system as {ORACLE_HOME} although I told the installation that I wanted {ORACLE_BASE} on another file system. So of course there wasn't enough room on the file system to make the starter database.
I thought I'd be able to correct this after installation. I tried to make a General Purpose Database with Database Configuration Assistant but DBCA in step 5 of 7, File Location Variables still shows {ORACLE_BASE} to be the same as {ORACLE_HOME}, and no way to change that variable on this screen. Don't I want to change { ORACLE_BASE} to a file system that has enough space to make the data base? How do I change this variable? When logged in as the oracle user, I don't see it listed by setenv.
When I ignored this setting and tried to finish DBCA, it hung.I looked for the {ORACLE*} environmental variables in the profile and login files of my oracle user, but didn't find that they were added by my Oracle setup. So I didn't think defining them as environmental variables would persist or overrule the global variables set at dbca run time.
In the dbca windows, step 5 displays these global variable settings provocatively in a table, as if Oracle wants me to verify and edit them if necessary, but I keep poking at them with right mouse clicks, left mouse clicks, backspace, and delete, but all I can do is turn them blue.
Currently when I use dbca to try to create a general purpose database, it hangs at 50% done, but not much space is used up on {ORACLE_HOME}. So it doesn't really look like the hang is caused by the disk being full. One of the processes that is hung is jre, so I thought I'd review the Oracle requirements and locations for JRE on my system. -
Updated to Access Connections 5.02 and location profiles disappeared
After updating Access Connections from 4.52 to 5.02 all the wireless location profiles are gone, including WEP keys, etc. The old version of AC worked fine on my X61S.
1) How can one upgrade to AC 5 without losing these?
2) I have complete system backups. In what file or registry entry can I find the saved location profiles from 4.52?Same thing happened to me. Most frustrating...
I was able to find a listing of the now-missing profiles in "HKLM\SOFTWARE\Lenovo\Access Connections\Locations". Using regedit, I removed the following DWORD key, "m_bHideInList", from each entry and all of my location profiles now appear in Access Connections again as they were before. Looks like there also are a variety of other (rather straightforward) configuration parameters in the registry key(s) listed above, so hopefully something in there is the magic bullet.
Anyway, hope this helps.
C'mon Lenovo -- this seems to be sloppy coding, pure and simple. You're better than this!
Message Edited by zdt123 on 09-19-2008 11:28 AM
Message Edited by zdt123 on 09-19-2008 11:29 AM -
Programmatically specify file location within ear file
Hi guys,
I am deploying an ear file under weblogic 6.1 and in part of the code I need to parse an xml file however, I can't figure out how to specify the path to the file. Whatever I try I always get an exception telling me the file cannot be found. The file itself resides within WEB-INF in the applications jar file which itself resides within the ear.
I don't know how to specify the files location.
Please help!
Simon.Hi Simon,
I'm not sure if this will help - but I have had similar problems and am happy to share my experiences with you and hope they help you. (my test were done on JRun 3.0 - but am sure the behavior under weblogic is similar)
I am not sure what method you are using for accessing your xml file and what the package structure of you apps is but I assume that you are either doing a
<code>
String fileName = "myFile.xml";
File f = new File(fileName);
or
URL u = this.getClass().getResource(fileName);
</code>
I found problems with both these methods when deploying as a web app. The first method places the file in
<code> {JRunPath}\servers\default </code>
directory (which it should as the spec by default creates the file in the users default directory)
and the second creates a URL that does not correctly map to the location (see my post http://forum.java.sun.com/thread.jsp?forum=136&thread=184500)
neither of these is suitable for deploying a webapp. The only way to locate the resource seems to be to use either
<code>
fileName = ServletContext.getRealPath(fileName);
or
URL url = ServletContext.getResource(fileName);
</code>
This does leave open this issue on how to pass the servlet context down to the specific class within your application that loads the xml - the uglier option is to pass the servlet context object right down to the class that loads the resource - the other option is to use some kind of a static initializer to make the servletcontext object globally available
hope this helps -
Default save file location ignored for Outlook attachments
Whenever I open an office attachment in Outlook, then edit and try to save, it always goes to "Libraries/Documents". I then have to do numerous clicks to get to my default location for every file.
Is there somewhere to set the default for this. The "default file location" in Excel or Word are ignored.
Thanks, JoeTry this:
Open the Registry Editor (regedit) and browse to the following registry key:
HKEY_CURRENT USER\Software\Microsoft\Office\15.0\Outlook\Options
Create a new String value called "DefaultPath" in the right pane, modify the entry to the locate as you want.
Another thread with the same topic for your reference:
http://answers.microsoft.com/en-us/windows/forum/windows_7-files/default-save-location-does-it-have-to-be-a-library/11ee9557-78ba-4236-8200-ee4961f881ee
Thanks.
Tony Chen
TechNet Community Support -
Problem: '\' character of file location disappears
Hi
I am trying to pass the location of a file on local disk as parameter to a java function... the function accepts 'String' type... but when I do this... the '\' characters in the location disappear.
For Example: If C:\Documents and Settings\Hllo\Desktop\trials is passed then it appears as C:Documents and SettingsHlloDesktop rialsI dont understand what is happening... any pointers....?
How do I overcome this? Please help..Ok,
This is what I am trying to do:
1. From a web page a user selects a file
2. On a button click, JavaScript function gets invoked and the file location is stored in a local variable and passed as parameter.
3. I am using DWR (AJAX), where the server side code 'FileOpener' will accept this string as parameter and tries to open the file.
So therefore I need something in this server side code to escape the backslash characters from the received argument.... How do I do it?
At present this is what I am doing and it shows me error:
BufferedReader read = new BufferedReader(new FileReader(fileLocation));
while((line = read.readLine()) != null) {
str = str + " " + line ;
read.close(); -
PHP settings - for file locations
how do i include file locations so i dont have to copy my .php files to each sub folder so it displays the contents?
a
right now, it will only display my .php files if i have them in the folders. i know i am missing a key something here:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="EN" lang="EN" dir="ltr">
<head profile="http://gmpg.org/xfn/11">
<title>Kira America | Products</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="imagetoolbar" content="no" />
<link rel="stylesheet" href="/ajxmenu_lathes.css" type="text/css" />
<link rel="stylesheet" href="/styles/layout.css" type="text/css" />
<!-- 3 Column Stylesheet Added To The Page And Not To The Layout.css -->
<link rel="stylesheet" href="/styles/3_column2.css" type="text/css" />
<link rel="stylesheet" href="/menus/ajxmenu.css" type="text/css" />
<div class="headnav1">
<div align="left">
<?php include ("/headnav.php");?>
</div>
</div>
</div>
</div id="topnav2">
<div align="center">
<?php include ("/topnav.php");?>
</div>
</div>it calls a headnav.php and then calls topnav.php
and now i get this - it's just not working out for me with any of my sections any of my sections:
div class="wrapper row4">
<div align="left">
<blockquote>
<p>
<?php include '../../../footer.php';?>
</p>
</blockquote>
</div>
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include() [<a href='function.include'>function.include</a>]: Unable to access footer.php in C:\wamp\www\products\VTL\KTC9-12f_files\sheet001.php on line 4656
Call Stack
Time
Memory
Function
Location
1
0.0022
1022360
{main}( )
..\sheet001.php:0
( ! ) SCREAM: Error suppression ignored for
( ! ) Warning: include(footer.php) [<a href='function.include'>function.include</a>]: failed to open stream: No such file or directory in C:\wamp\www\products\VTL\KTC9-12f_files\sheet001.php on line 4656
Call Stack
Time
Memory
Function
Location
1
0.0022
1022360
{main}( )
..\sheet001.php:0 -
How could I delete files with name string with "TAL" and older than 05.05.
How could I delete files with name string with "TAL" and older than 05.05.2009 on unix
Our ECC Ides system today was not responsible. For first time 17 users were working on the systtem (IWN2008/SQL2005 based). Before the people were maximally 5.
The server is done by making a homogeneous system copy from an blade machine(now it is an VIrTUAL)
There was enaught disk space. However I checked Wokload 03sdn transaction) inn system. and found out that at that time of restarting(I had to restart system 3 times to get logged on the system and even then it was almost unresponsive.
I can found in there top abap."Login_Pw", "SESSION_MANAGER", "?". (BAtch), "ADMSBUF, >DEleyed Function call, RSPOWPOO""RSWWclear", ""VA01", "SAPMHHTP "Buf Sync" >DDLOC CLEANUP)""rsbtctE"
What can I do?
¸
Who could interfer SAP_CCMS_MONI_BATCH_DPSAP_CCMS_MONI_BATCH_DP
the 2 main users under users profile were ZUGTIN running and SAPSYS( running many system jobs)
How to approach the problem
Maybe you are looking for
-
Due to my work I have events that start in the evening and finish next day. When I saw them in iCal (month view) they show as finishing the first (starting) day. How can I see next day as busy too?
-
Restore Disc Will Not Boot From External DVD Drive
I am using an original MacBook Pro that I decided could use a good restore, and started to clean house. The optical drive is broken, so I am using an external USB drive. I inserted the restore disc that came with the computer (It has OS X 10.4.6 on i
-
How to switch to an already open app?
Hello folks, using 10g and on app startup I need to see if the app is already running and if so, switch to it but don't start another instance of the app. I can't seem to find an example of this. I swear I have done this before but can't find an exam
-
Business Activity details in Opportunity transaction in CRM table.
Hi In which table in CRM can i find data entered in business activity details in opportunity transaction. Please advice . Thanks, Vaishnavi
-
Steps to write a struts program in WSADv5.1.2???
Hi Friends, I want to create a struts application in WSAD v5.1.2, so for that what are all the steps i need to follw from the scratch? Can u help me.???