How can I move file from one path to another by java
Hello
I need to move the following file c:\abc\aa.txt
to the follwing path c:\def
How can i do it by java program?
Regards
Hi,
Try the following code:
boolean moveFile = new File("c:\\abc\\aa.txt").renameTo(new File("c:\\def",
new File("c:\\abc\\aa.txt").getName()));
Hope that helps.
Savitha.
OTN group@IDC
Similar Messages
-
How do I move files from one album to another?
How can I move files from one album to another? And why does itunes split up imported folders?
Press the Command key while dragging them.
(58054) -
Can I move files from one caralog to another?
Can I move files from one caralog to another?
No. you cannot.
This, among many other reasons, is why multiple catalogs are not recommended.
(You could import the photo into another catalog, and delete from the first catalog ... and without first using the command File->Write Tags, you will lose your tags, captions and other metdata; version sets, stacks, album/collection membership are lost in any case) -
Can't move files from one volume to another
Using the 1.2 client on SLED, I don't appear to be able to move files from
one volume to another. I have two drive "mappings", each to a
different volume on a NW65SP5 box, but when I try and cut and paste files
I get an error saying "Not on the same file system". However if I drop to
a terminal and just use mv, that works.
Is this a known issue?
JoeOn Tue, 12 Sep 2006 12:59:23 +0000, Joseph Marton wrote:
Hmm, yep get the smae problem when trying to move files.
Copy works just great though.
I know there are some issues in Gnome/Nautilus that's being worked upon.
These are outlined in the Readme. For example it's not possible to copy a
folder from Server A to Server B, then delete the folder form Server A.
Finally later on copy the folder back to Server A from Server B.
Also Gnome is leaking file handles, which could be the cause for the
problem we're getting here.
I'll ask my contact at Novell about this and have him enter it in as a bug
if it's not a known issue.
For a workaround you already have a good alternative of using mv in a
terminal.
Niclas Ekstedt, CNA/CNE/CNS/CLS
Senior Network Consultant/NSC Sysop
Telindus Sweden AB -
How can I move Bookmarks from my MacBook Pro to my iMac; just Bookmarks, nothing else.
Safari Bookmarks?
Export bookmarks as a HTML file to a usb stick or something.
Put the USB in your other computer and import bookmarks -
How do I move files from one folder to another?
On my MacBookPro I am trying to move files from one folder to a BSB drive. I can copy, but I do not want the files left in the original location. What do I do?
J WPress the Command key while dragging them.
(58054) -
How can i move music from one account to another
I have 4 different accounts in Itunes and i wish to move all the music into one account
help please !!!!You can't transfer content from one account to another account, nor can you merge accounts - content will remain tied to the account that downloaded it
-
How can I Move data from one column to another in my access table?
I have two columns, one that stores current month’s data and one that stores last month’s data. Every month data from column 2 (this month’s data) needs to be moved to column 1 that holds last month’s data. I then null out column 2 so I can accumulates this month’s data.
I understand how to drop a column or add a column, how do I transfer data from one column to another.
Here is my trial code:
<cfquery name="qQueryChangeColumnName" datasource="#dsn#">
ALTER TABLE leaderboard
UPDATE leaderboard SET points2 = points3
</cfquery>
Unfortunately, I get the following error:
Error Executing Database Query.
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Syntax error in ALTER TABLE statement.
How can I transfer my data with the alter table method?I looked up the Access SQL reference (which is probably a
good place to start when having issues with Access SQL), and
it suggests you probably need a WHERE clause in there.
I agree the documentation is a good place to start. But you should not need a WHERE clause here.
Too few parameters. Expected 1.
If you run the SQL directly in Access, what are the results? At the very least, it should provide a more informative error message.. -
I suddenly can't move files from one folder to another in my FlashHelp project.
I have RH8 (8.02). I have been working on this project for a couple of years now.
What changed? I had imported a Word document and then removed the document and the folder it created from the Project Manager. Now I cannot move any of my files from one folder to another in the Project Manager pod. I susptected a corrupt CPD file so I closed the project, deleted the CPD file. Next I opened Robo from Programes (I never open from the .xpj file), went to Tools>Options and deleted the pinned most recently used project. Select Open, and locate/open the xpj file. I've also re-generated the output (no errors) and completed all these steps again. Of course Robo only goes haywire on me right before I have to publish for our new software release.Hi there
From what I'm seeing my own guess here is that RoboHelp is still believing that the content belongs to word.
I might suggest the following steps.
Open Winows Explorer and make copies of the HTML files involved. Then from RoboHelp, delete or remove the content. Then use the Import function to add the desired HTML files back into the project into the desired folder.
My thought is that by taking these steps you will have effectively disassociated Word and the topics should now be independent topics that RoboHelp should allow you to manage as you wish.
Hope you get it sorted... Rick
Helpful and Handy Links
RoboHelp Wish Form/Bug Reporting Form
Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
Adobe Certified RoboHelp HTML Training
SorcerStone Blog
RoboHelp eBooks -
How can I move contact from one group to another?
HOW CAN I MOVE A CONTACT FROM ONE GROUP TO ANOTHER GROUP?
You usually make contact groups via a computer (Mac or PC). If you use a mac and sync. via iCloud, you can go into Contacs.app and organize your contacts as you wish. Then (if) you sync with iCloud the groups you've changed or created will be displayed on your iPhone and (or) iPad.
Hope this helped you. -
How can i move settings from one user to another?
How do I move all settings and permiions from one user to another?
http://discussions.apple.com/thread.jspa?messageID=11320719�
http://discussions.apple.com/thread.jspa?messageID=12317222
http://discussions.apple.com/thread.jspa?messageID=6331229 -
How do you move files from one screen to another
how do you organize the folders on the ipad, for example, i want to move folders from one page to another
tab and hold until it wiggle and drag it
-
I am using iMovie 10.0.7 on a 1-week old iMac 27" running Yosemite 10.10.2. I migrated from iMovie 9 on a 2008 iMac running Snow Leopard and updated the libraries and events, etc.
I have two external drives connected via USB. I want to move / consolidate the library and clips from one of the external drives to the new iMac's 3TB fusion drive. This is to make room on the external drive to run Time Machine backups.
Apple's instructions on managing libraries and moving/copying clips/events tell me to drag to move between libraries and to Option-drag to copy. However, simply dragging only copies. I find that if I Command-drag the events/clips, I can "move" them. But when I look outside iMovie in the Mac OS X Finder, the event folders and clip files themselves are still sitting in the original drive.
I'm very perplexed as to how to really move the clips and event structure. Should I manually copy the clips and event folder structure outside of iMovie? I worry I will mess up iMovie's internal record keeping and folder structure information.
Thanks in advance.Ahh, Ok. I actually had to go to Lynda.com to watch a training video of this highly bassackwards maneuver, but now I have it. In other words, while the intuitive thing is to make a new event to hold the clip you want and then open the old event and drag the clip into it's new event, the only way to accomplish this maneuver is to NOT create a new event, but rather, go to the clip AFTER the one you want to move, select it and then Right-Click on it and select SPLIT EVENT BEFORE SELECTED CLIP (or go to FILE>SPLIT EVENT BEFORE SELECTED CLIP). Then you wait a few seconds while the program thinks a bit (no feedback it is doing this - just a pause) and then it automatically creates a new event with the clip you wanted. Now just double-click the new event and name it something meaningful.
Thanks for your help! -
How can I transfer files from one user to another user?
I have a Macbook Air with 10.9.5.
I have two admin users. I want to transfer all the files from User A to User B's profile so that I can get rid of User A and just use User B from now on. So far I can access the files if I change sharing permissions but the files are not under the root User B's folder still. Any ideas on how to do this? I also have greyed out folders when I created User B in the root directory.
Root folder /UserA/ includes all the usual folder links like desktop, documents, etc, including some created one for example "myoldphotos". When i created UserB/ it has all the desktop, documents, etc folders (but with nothing in them since it's new) but also the myoldphotos folder, except it's greyed out and I can't do anything with it at all or open it or anything. it's just there?Thank you, that worked to transfer files. After I move it into my normal home folder, can I delete it from the Shared folder?
Also if anyone has any ideas on the greyed out folders I would be thankful. For example I moved the 'myoldphotos' folder from users/UserA to users/Shared then from there to users/UserB and it worked. HOWEVER, the greyed out mysterious folder is still there and i can't do anything about it. It also affected my new copied folder, changing the name from myoldphotos to "myoldphotos 2" like as if there IS a folder there with the same name already. I can't click on the greyed out folder to open it or anything. -
How do i move files from one user to another user?
i transferred files, etc. from an ibook G4 to my new macpro. i had 3 users on the older ibook. when i try to open files as one of the users from the ibook on my macpro, it says i do not have permission to open the files. i am the administrator on both computers. i would like to do away with all users and merge everything and re-organize into files.
You can go to /Users - select the other user folder - do a Command+I (Get Info) on it. Toggle open Permissions. Click the lock to allow changes. Hit the + sign at the bottom and add yourself to the list. Change the permissions next to your name to read and write. Under the gear menu select apply to enclosed items.
Close the Get Info window and repeat with all other user folders.
Now you cou can copy all the data to your own User and get rid of the other User directories.
Rick
Maybe you are looking for
-
External Hard drive will not mount on desktop
I have a 17" Powerbook G4 that has replaced a broken iBook G4. I've been using a Western Digital MyBook Pro Edition as a secondary drive for my multimedia as well as my iTunes Library. It worked fine on the old iBook. When I plug it into the Powerboo
-
How do I print envelopes on my HP Officejet 4620 using notepad or similar?
I tried to post my address and receiver address on note pad. I selected #10 envelope, but the printer said I had the wrong size paper.
-
Setting up replication with client written in C++ and DB master in Java
Hi I am trying to write C++ client that will join replicated environment created by a master written in java. For JAVA, I am using Berkley DB Java 4.0.103 API. So far, I have written Master in java which creates a replicated environment. I also have
-
I can't get the autofill function to work
When filling out a form, the auto fill function points to my wife (who owns the icloud). How can I get it to point to my data?
-
HANA and the Overall Confusion
HI All, We just got back as well and boy are there so many opinions on HANA, the roadmap, etc. We decided to place this topic and group all questions we've read from earlier posts along with what other customers were saying and asking. 1. Does SAP HA