0
I NEED HELP
For anyone using netbeans i need help. Whole code not work because my third if condition is not valid and i can't find solution.. can someone help me with that condition.. Tnx https://code.sololearn.com/cRr0wfZ0cMMX/?ref=app
7 Respostas
+ 4
For a better understanding:
Enter the path of folder.
Enter the path of target folder.
Put folder into target folder.
If target folder does not exist create new folder.
Am I correct?
+ 10
Denise Roßberg
The destination path must be specified first because it cannot exist before the file is copied, seems to be a problem with if-statements and their layout, as if they should be reversed?
[ Edited: ]
I don't know how file manipulation methods work?
+ 4
Yes you are correct
+ 2
Important before running this code: work only with sample files/folders or make a copy of your files/folders
Btw. I did not add the option replace a file while moving/copying
-> I think you should be careful with this option
To keep it more simplier I only allow file to folder
Btw: Files.isDirectory(path) is a very useful method.
Note: I used some txt.files to try the code.
If file exists and folder exists -> move file to folder
If file exists and folder not -> create folder -> move file to folder
For moving folder to folder you should write two methods: one for moving files, one for moving folders
Hope this code helps you.
https://code.sololearn.com/cDjfM82dWRR7/?ref=app
+ 2
About input (I am using ubuntu):
E.g.
source: /home/folder/myFile
target: /home/targetFolder
If you would enter
/home/targetFolder/myFile it would not work.
Enter only path of the target folder.
+ 1
Can you tell me which error message you get?
I need a bit time but I will check this code.
0
Hello.
"BUILD SUCCESSFUL"
And file/folder is not copy.
Sometime create Folder i javaapplication folder where i work on this project.
I can send to you whole project List,Info,Rename,Delete and Create Dir work
but option Copy and Move not. Tnx for your time