NW.js Copy and Move file not working

Get help using Construct 2

Post » Tue Apr 05, 2016 1:47 am

Hello!

I am trying to move or copy files through Nw.js's On file Dropped event but it just isn't working for some reason.

I can rename files, see the name of the dropped files, and write files, but something is stopping the move and copy actions from working.

Here's a screenshot:
Image

I am running construct 2 as administrator, I tried exporting the project and running it as administrator and that did not work either.

There has to be something I'm missing here!
Thank you in advance for any help
B
6
Posts: 11
Reputation: 572

Post » Mon Jan 30, 2017 4:15 pm

Necroing the topic
i have the same problem!
Last edited by pirikos on Mon Jan 30, 2017 4:27 pm, edited 1 time in total.
B
10
S
2
Posts: 12
Reputation: 1,160

Post » Mon Jan 30, 2017 4:23 pm

supajackle wrote:Hello!

I am trying to move or copy files through Nw.js's On file Dropped event but it just isn't working for some reason.

I can rename files, see the name of the dropped files, and write files, but something is stopping the move and copy actions from working.

Here's a screenshot:
Image

I am running construct 2 as administrator, I tried exporting the project and running it as administrator and that did not work either.

There has to be something I'm missing here!
Thank you in advance for any help


Pretty sure (However might be wrong as I have to check) but you need to add the filename of the file you copy.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Mon Jan 30, 2017 4:26 pm

Nwjs.droppedFile is the name of the file you are copying. It basically give you the path of the dropped file.
B
10
S
2
Posts: 12
Reputation: 1,160

Post » Mon Jan 30, 2017 6:17 pm

What does userfolder & testfolder evaluate to? Does userfolder end with a slash?
B
94
S
33
G
114
Posts: 5,362
Reputation: 73,785

Post » Mon Jan 30, 2017 9:01 pm

in my case i've tried to just copy a dropped file to an already created folder and it didn't work (same for moving). It may be an authorization problem or something like that.
I've tried it with a slash at the end of the destination path. The original file path is just NWjs.DroppedFile
B
10
S
2
Posts: 12
Reputation: 1,160

Post » Tue Jan 31, 2017 9:45 am

pirikos wrote:in my case i've tried to just copy a dropped file to an already created folder and it didn't work (same for moving). It may be an authorization problem or something like that.
I've tried it with a slash at the end of the destination path. The original file path is just NWjs.DroppedFile


Should probably have written it a bit more clear In the first reply, but what I meant was that you have to include the filename in the destination path so it look like this. Here are 3 simple examples.

Image

You can change the destination filename (B.rtf) to whatever you like. In this case I just made it B rather than A.
Last edited by nimos100 on Fri Jul 07, 2017 11:29 am, edited 3 times in total.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848

Post » Tue Jan 31, 2017 12:50 pm

It's working as intended :D
That's a life saver, thank you !
B
10
S
2
Posts: 12
Reputation: 1,160

Post » Sun Jun 18, 2017 2:32 pm

@nimos100

Hey it seem your image doesn't show up, can you please reupload ?

Thank's !!
B
11
S
3
Posts: 40
Reputation: 815

Post » Fri Jul 07, 2017 11:30 am

Casimir wrote:@nimos100

Hey it seem your image doesn't show up, can you please reupload ?

Thank's !!


It should be fixed now.
B
44
S
11
G
2
Posts: 1,182
Reputation: 6,848


Return to How do I....?

Who is online

Users browsing this forum: dop2000, jezjones24, ultrafop, Yahoo [Bot] and 14 guests