tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jef Sullivan" <j...@ikano.com>
Subject RE: Moving a file
Date Tue, 13 Dec 2005 17:17:18 GMT
Additionally,
The error that I am getting is the file does not exist. 
Yet, the file does exists. I have verified its location,
and the spelling of the path and filename. Everything 
matches including the case sensitivity.




Jef 

> -----Original Message-----
> From: Jef Sullivan [mailto:jefs@ikano.com] 
> Sent: Monday, December 12, 2005 3:27 PM
> To: 'Tomcat Users List'
> Cc: users@tomcat.apache.org
> Subject: Moving a file
> 
> Forgive the double posting on this message, if it occurs. 
> 
> I need help with some code..
> I want to move a file (CVS) to another folder.
> The code that I am using is this.
> 
> File file = new File("Summary_" + dateVar + ".csv");
> File dir = new File(propStuff.getProperty("recordDir"));	
> // value is
> written C:\\Workspace\\Reports\\
> 
> boolean success = file.renameTo(new File(dir, 
> file.getName())); If (!success) {
> 	// Error text
> }
> 
> This keeps producing an error. The code is consistent on 
> several websites that I have found when googling on java: 
> move a file. Any suggestions on how to get this working?
> 
> 
> 
> 
> Jef
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message