Giving file path in unix and windows

hi,
i'm having problem with reading file from both windows and unix as now i give
if (os == win)
file="mydir\\mydir1\\myfile"
else
file="mydir/mydir1/myfile"
wherei get mydir* from environment.
and then open that file.
but i feel the above is clumsy and is more like C #ifdef
Can you please help me out on this.
Thanks & Regards
Rajkumar

hi,
use the System property "file.separator" to figure out the seperator.
for eg
java.util.Properties prop = System.getProperties();
String separator = prop.getProperty("file.separator");
System.out.println("separator :" + separator);hope that helpz
cheerz
ynkrish

Similar Messages

  • File permissions $OH Unix and Windows

    Hi,
    I am examining an Oracle audit and now looking for all the default file/directory permissions on Unix and Windows. Have searched a lot of sites now but could not find a proper list with all the permissions mentiond. Does anybody knows where to find such a list (or script) to check if my current settings are ok?
    I use OEM to check for my open security policies but this permission item is very hard to find unfortunately.
    So please some info on this unix/windows permissions issue.
    Thanks,
    Paul
    btw Have found some settings for bdump, udump, adump, $OH/rdbms/log and audit (umask 0177) but want to check those other permissions for the whoe installed Oracle software en admin directories.
    Edited by: Paul van Rixel on 12-mei-2009 13:30

    Hi,
    Picked a few alerts from EM, for example:
    Allowed Logon Version
    Default Passwords
    Default Permanent Tablespace Set to a System Tablespace
    Initialization Parameter File Permission
    The last few weeks I have already disabled some of the policies but these are the alerts which are left now and I want to get rid of them.
    When you click in EM on "Initialization Parameter File Permission" the description of it is: Ensures that access to the initialization paramater file is restricted to the owner of the Oracle software set and the DBA group.
    So, ok thats is clear to me but I want to look at the whole server/database to make it a "clean" server/db.
    Paul

  • Common URL format for sharing file paths between Mac and Windows?

    Hi -
    I have to integrate several Macs into a Windows environment. We need to be able to copy and paste file paths to share between all machines. Is there a common URL format that can be used between the platforms?
    On Windows, I have:
    \\server\share\file
    On the Mac:
    smb://server/share/file
    Thank you for your help,
    Steve

    On Windows you have what is known as a "UNC".
    On the Mac, you have a "URL". It starts with the protocol to use "smb" then gives the path to the item using standard conventions.
    UNC is Microsoft mainly.
    The only way I know for Windows to use a URL is with an application like a web browser or ftp client.
    On the Mac, you can use UNCs but they must be modified as follows.
    In Terminal:
    smbclient \\\\servername\\sharename\\filename -U username
    And enter a password if prompted.
    Notice that you must double up the slashes. This is due to how UNIX shells treat the backslash.
    You will connect to the share, but it will only be in Terminal.

  • Hey guys, how can i password protect my files in external hard drive? I want to access those files both from mac and windows PC!

    Hey guys, how can i password protect my files in external hard drive? I want to access those files both from mac and windows PC!

    If you want a cross-platform solution that doesn't require the use of third-party software, use an external drive with hardware encryption. The device will have either a physical key or a numeric keypad. I don't have a specific recommendation.

  • Essbase system 9 -difference between the installation in UNIX and windows

    Hi,
    plz let me know the difference in installation in UNIX and windows, let me know the process. this is bit ugent...
    advanced thanks for your help and support.
    Thanks,
    sudhakar

    Hi Sudhakar,
    You have 2 documents for windows_installation and unix_installatio in the following location.
    http://download.oracle.com/docs/cd/E10530_01/doc/nav/portal_1.htm
    Sandeep Reddy Enti
    HCC
    http://analytiks.blogspot.com

  • I am thinking of buying a iPad but my main desktop machine uses Windows 7 and MS Office.  How easy or difficult is it to transfer data files between the iPad and Windows?  Are there obvious problems or the need for some form of conversion programs?

    I am thinking of buying a iPad but my main desktop machine uses Windows 7 and MS Office.  How easy or difficult is it to transfer data files between the iPad and Windows?  Are there obvious problems or the need for some form of conversion programs?
    Many thanks for any advice.
    David

    You don't need conversion programs, iTunes can copy most of your content over to the iPad via the file sharing section, and some apps also support Dropbox, email attachments, transfer via your wifi network. There are a number of apps that you can get that support Microsoft office file (microsoft don't make an app versions of their software) e.g. from Apple there are Pages (word support), Numbers (excel) and Keynote (powerpoint), and from third-parties there are apps such as Documents To Go and QuickOffice HD

  • Currency symbol  different in unix and windows

    I am using NumberFormat.getCurrencyInstance() passing a bigdecimal to call format method , the output is different in unix and windows , in windows it works fine the result is $0.00 where as in unix I get this 0.00
    please explain me how to resolve this ? code to format bigdecimal
         NumberFormat.getCurrencyInstance().format(new BigDecimal(0));

    My guess is your unix doesn't have the locale set right. If you are US try this.
    NumberFormat.getCurrencyInstance(Locale.US).format(new BigDecimal(0));JSG

  • Bug when getting file path in non-english Windows Vista

    Hello,
    I'm getting an error when trying to get the file path of a video in a non-english Windows Vista... The code is:
    var file = "video.flv"
    var filePath = air.File.applicationStorageDirectory.resolvePath(file);
    filePath = filePath.nativePath;
    The filePath variable is used later by a flash video player to load the video file..
    In the brazilian Windows Vista the path of the StorageDirectory would be something like "C:\Usuários\(user name)\..." but if I run this script it returns "C:\Users\(user name)\..." as the native path.
    The problem seems to be in the "nativePath" function, cause I'm able to copy files to the app-storage folder using the "air.File.appicationStorageDirectory.resolvePath()" method without any problems.
    I could insert a small code which substitutes "Users" with "Usuários" but then it wouldn't work on an english Vista...
    Any ideas on this? Is there a way to check the language of the operating system in Air so to act accordingly?
    Thanks for any help!

    Hello,
    has anybody found a solution?
    Testcase: SQL Developer 3.1 on a German XP with default NLS Settings
    CREATE TABLE "TEST_TABLE"
           "NUM" NUMBER
          ,"VCH"  VARCHAR2(10 BYTE)
        ) ;Test file test_insert.dsv
    num;vch
    1;KL
    1,5;tz
    12345,45;ooImporting using the wizard inserts the first row correctly, for the others I get
    SET DEFINE OFF
    --Einfügen für Zeilen  1  bis  3  nicht erfolgreich
    --ORA-01722: invalid number
    --Zeile 2
    INSERT INTO TEST_TABLE (NUM, VCH) VALUES (1.5,'tz');
    --Zeile 3
    INSERT INTO TEST_TABLE (NUM, VCH) VALUES (12345.45,'oo');Beside the wrong umlaut in the message the insert statement itself is correct, because you cannot use the german decimal separator "," in the script. The bug is, that it should use the same NLS settings for generating and running the script.
    Regards
    Marcus

  • FTP vs. NFS- basic configuration and doubts - bt. unix and windows systems

    Hi all,
    I need to configure a connection between PI (unix box) and a windows server using File Adapter (both sender and receiver).
    My doubts are:
    - Which is preferable type of conection: NFS or FTP?
    - Which are the advantages and disadvanteges of both?
    - Most important: Which are the prerrequisites for both ways? Such as installing server ftp, or mounting folders, OS configuration, security config. Etc. etc.
    I will apprettiate if you could also post a direct link to documentation.
    Thanks in advance.
    Exe.
    Edited by: EZEG80 on Nov 9, 2010 1:18 AM

    Hi,
      NFS: when the file folder is available on the XI Server
    FTP: when it is at remote
    If the Sharing folder is in the same XI system then NFS..If the sharing folder is in different system it is FTP.
    we will use NFS when we required to poll the files from local machines.and we will use FTP when we required to poll the data from the FTP server which are in the remote side or outside of the firewall
    FTP (file transfer protocol) here you are getting data from ftp server or you are writing to FTP server.
    NFS is used when your XI can access the file location directly using the NFS protocol.
    When the File System can be access using FTP protocol, then you need to use FTP and provide the FTP server details and user crendentials to pull data from the File Server.
    NFS is used when you want XI to use the NFS protocol to access thye location of the file.
    FTP is File Transfer Protocol and is used when your Sender SYstem is using an FTP system to send / receiver files.
    we are using NFS when we required to poll the files from local machines..
    We are using FTP when we required to poll the data from the FTP server which are in the remote side or outside of the firewall..
    For more info....go thru these threads...
    FTP and NFS?????
    differnce between nfs and ftp
    FTP Vs NFS
    Regds,
    Pinangshuk.

  • Difference of links path between Mac and Windows

    We currently use an InDesign Server solution on Mac to generate our PDF. InDesign files are created on Mac and our InDesign server points to volumes where are stored links. On Mac, the path looks like this:
    VOLUME:FOLDER_1:SUBFOLDER_1:SUBFOLDER_2:LINK_NAME.
    We consider to migrate our InDesign server onto Windows. So I began some tests on a client version and the same InDesign file opened on Windows and whose links are stored in the same place opens with missing links as the path on Windows looks like this: volume_name\volume\FOLDER_1\SUBFOLDER_1\SUBFOLDER_2\LINK_NAME
    So I have to relink manually, which is impossible in our workflow.
    Does anyone know if we may encounter the same problem with a server version? If yes, do you know a script that automatically relink image files when InDesign files will be opened by InDesign Server?

    I don't personally have much experience relinking across platforms. (We use Windows servers although I use Mac locally.) But, here's what info I can provide:
    File paths in InDesign can be specified in 2 ways. One is platform-specific paths, and the second is URI notation. The URI notation is the same cross-platform, but even so, I imagine the volume names are different as well. Specifying the URIs in an InDesign file would prove to be challenging as well, although you can easily specify it in an IDML file.
    Another avenue to explore would be to specify relative paths. By default InDesign writes absolute paths, but relative paths are supported. If I'm not mistaken, that's what the InDesign package functionality does.
    Your best bet will probably be to run a script when the document loads on the machine for the first time and loop through all the links and change the paths to the correct location.
    HTH,
    Harbs

  • FIle path between iTunes and music files broken

    Somehow I've managed to lose the file path connecting my songs on an external hard drive with iTunes. I've checked the advanced aoptions to make sure that iTunes is pointing to F: (instead of C:) but no dice.
    Obviously I can go through and reconnect them all individually but for 16,000 songs that's not an option. I also don't want to reload the song files (by opening them directly from the drive) and lose all my play count information.
    I've had this happen before when upgrading PCs or when the EHD was renamed and been able to fix it but this time nothing seems to work.

    Yes it has. I recently changed from laptop to PC and managed to load iTunes on PC, copy across playcount and album artwork information and have the EHD connected and showing the correct pathways. Everything was working fine for about 3 days. When launching iTunes a couple of days ago, it asked me to go through the setup screens again (which I did) and since then the file paths have been missing. I've been into the xml file of the iTunes library and it shows everything pointing to the default c: drive location. This may be because I read that consolidating the library (under the advanced tab) would help but it didn't.

  • File transfer between mac and windows 7

    Is it possible to transfer files between my Mac and a windows 7 machine via bluetooth?
    MacBook Pro OS X 10.6.4
    Thanks

    It will be slow, but there's no reason it shouldn't work as long as the Bluetooth hardware on both computers has the File Transfer Profile (all Macs do), and *Bluetooth Sharing* is checked in the Sharing system preferences pane on the Mac.
    If the computers are close enough to send files via Bluetooth, you'd be much better off just networking them together. You can then "mount" the PC hard disk on the Mac like any other disk and move files around easily. It will be hundreds of times faster too.

  • File transfer between Mac and Windows

    I am running Windows on my Mac and I transfer files between mac and Windows alot using my external hard drive. I was wondering if there was an easier way to do this than having to use my external hard drive like a networking solution or something. Thanks...

    i also run windows on my mac (for work). The issue i had was that when booted in osx, i could see the windows partition, and copy files FROM it to the mac side, but i could not copy files TO the windows partition.
    As i understand it, this is because the apple NTFS driver (to read the windows partition) only allows read access (not read and write access). It was easily solved with MacFuse (which is an open source way to add different disk file systems to your mac, kind of like teaching it a new language), and NTFS-3G for mac osx.
    http://macntfs-3g.blogspot.com/
    scroll down a bit for the download link. The installer will put in MacFuse and NTFS-3G, so it's the only one you need.
    After a reboot, i can read/write to the windows partition while booted into macosx (and it's free).
    i hope that helps.
    p.s. the efi boot manager download is NOT required.

  • NAS files, Offline, Sync Centre and windows 8.1

    Hello,
    I can't believe how difficult it is to locate an essential feature of windows xp and 7 in Windows 8.1! My shiny new 8.1 machine has mapped a folder on a NAS device to its P: drive. This folder is used by a couple of other machines in my small network (both
    W7) and they have made the folder "available offline" as they need to be able to access the files when away from home. This works fine and files are synchronised on return to the office. 
    I cannot find any way to "make the folder available offline" with my 8.1 machine. Sync Centre (in the control panel) wont allow me to create any "partnerships". The nearest I can get to this functionality is SkyDrive but that's not what
    I need.
    This has GOT to be a common requirement, surely? Am I missing something?
    Many thanks
    Stuart

    Hi Stuart,
    Which version of Windows 8.1 are you running? Is it the base version of Windows 8.1 or the Enterprise version? Concurrently, which version of Windows XP and Windows 7 are you running? If I am correct in the my thinking, I would guess that you are currently
    running the professional version of Windows XP and Windows 7. To the best of my knowledge, Sync Center does require Windows Client to be at the Professional level edition or higher. According to
    this Sync Center FAQ from Microsoft the ability to sync with network folders will not work with Home Premium editions which is equivalent to the standard version of Windows 8.1 I can confirm that Sync Center and offline files does indeed work in Windows
    8.1 Professional as I am using Windows 8.1 myself and just performed a local test. 
    If you were to upgrade to Windows 8.1 Pro by purchasing the Windows 8.1 Pro Pack you will gain quite a few features such as the ability to join a domain. Check out
    this page from Microsoft to compare the features each edition of Windows 8.1 offers
    I hope this helps!

  • Sharing files between mac os and windows on same computer???

    I am going to get a new Intel based mac. Is there a way to share files between the mac and the windows os?
    Example: I would like to share my iTunes music library from mac os so it is also available in Windows iTunes.
    Is there a way to do this without having to mirror the entire library within Windows?
    Thanks!!!!

    It also depends on how you want Windows to be working on your PC - do you want to have a dual boot system (i.e. you choose whether you want to use OS X or Windows when you turn the computer on) or do you want to use a 'virtualization' program like Parallels (i.e. Windows loads up as a window on your OS X desktop).
    Depending on how you want to do things will affect the ease of integration between OS X and Windows. Via the virtualization route, what you want to do can be done in a couple of clicks - you go into network neighbourhood (in Windows) and set up a Network shortcut to the files you want. You can do the same trick via OS X using the 'Network' functionality in Finder.
    Martin Bradford-Gago
    Life as an Apple Switcher: http://aurora7795.blogspot.com

Maybe you are looking for

  • Slow down after crash

    I recently had a total crash. I discovered that Time Machine had not worked since March, my fault. I am rebuilding the system and starting to use it. It seems to slow things down quite a bit when it is backing up. I don't remember this being the case

  • NX to DVD Pla

    Hey there, can any one help me? I have a JVC TV and DVD player setup, now is it possible to connect the DVD player to my external Audigy 2 NX external soundcard and utilise my Inspire T7900 speakers? Hope somebody can be of help - J

  • Illustrator file saves as blank jpeg

    HI everyone. I have a large illustrator file that I need to save as a jpeg for a table cloth printer. Every time I try to save the illustrator file as a jpeg the jpeg opens blank. Does any one know what might be going on? I've never seen this happen

  • For display budgeted amount in cost center what is table in sap?

    For display budgeted amount in cost center what is table in sap?

  • Regarding the messageAuthorizationPolicy

    Hi , I am new to JMS. I implemented JMS borker and two clients (Sender and receiver with Destination as Queue). If Sender sends some messages Receiver is able to receive them. But If I start two receivers(Say A and B) some messages are sent to Receiv