Source language: Translate to:

Temp directory redireting to Desktop

Questions about our File Management and Internet FTP plug-in

Temp directory redireting to Desktop

Postby DaveJ » Wed Aug 13, 2014 3:14 am

I have a very strange fault where I have created a pub that copies data from a network location to a folder within the temp directory as below.
Code: Select all
fmConnectLocal "remote" "InitialPath=\\remotedriveshare\Workshop\Barcode"
fmConnectLocal "local1" "InitialPath=[Tempdir]Barcode"
Setvar "status" "Loading"
fmSelectAll "remote" "IncludeFiles=Yes;IncludeFolders=No"
Setvar "status" "Copying to temp"
fmCopySelected "remote" "local1" "GetConfirmation=Yes;ShowProgress=Yes;AllowResume=No"
Setvar "status" "Done"
Delay "1000"
Run "[TempDir]Barcode\BMS11.exe" "" "LoadComplete" "" ""
Exit "" ""


Every time I try and run this, it shows the local directory to be the desktop and the remote directory.

These are the variable saved;
LastError=The system cannot find the file specified
local1.CurrentDir=C:\Users\David.Jarrard\Desktop
local1.FileMask=*.*
local1.Status=Connected
local1.TotalItems=63
remote.CurrentDir=C:\Users\David.Jarrard\Desktop
remote.FileMask=*.*
remote.SelCount=0
remote.Status=Connected
remote.TotalItems=63
status=Done
How can I fix this?

Thanks

Dave J
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: Temp directory redireting to Desktop

Postby Gaev » Wed Aug 13, 2014 5:26 am

Dave J:

I tried the sample that came with the plugin ... and modified it to connect to [TempDir] ... and it popped up a message telling me that it could not connect to that folder ... tried another folder and it worked fine.

Because the fmConnectLocal command failed, the plugin defaulted to my Desktop folder.

If you did not see an error message, check whether you have turned OFF the showing of errors (e.g. fmShowErrors "No").
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Temp directory redireting to Desktop

Postby DaveJ » Wed Aug 13, 2014 6:45 am

Thanks Gaev,
I haven't turned off errors but that sounds like the issue.
It doesn't explain why however the plugin cant use the temp directory. Most other programs use the temp directory and I also did an xcopy command to do the copy and it worked ok.
It just seems to be an issue with the plugin!

Dave J
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: Temp directory redireting to Desktop

Postby Gaev » Wed Aug 13, 2014 7:35 am

Dave J:
It doesn't explain why however the plugin cant use the temp directory. Most other programs use the temp directory and I also did an xcopy command to do the copy and it worked ok.
It just seems to be an issue with the plugin!

It might have something to do with combination of Protocol and File Access Rights ... you/user would have full access rights when using File protocol but (perhaps) not FTP.
User avatar
Gaev
 
Posts: 3728
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Re: Temp directory redireting to Desktop

Postby DaveJ » Wed Aug 13, 2014 10:42 am

Hi Gaev,
Would me as the user not have the same rights as when I execute the xcopy command within a dos prompt.
Im using the file management and not FTP so would have thought it would work.
I think I will need to put in a request to Neosoft unless Dave is already reading this.

DaveJ
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: Temp directory redireting to Desktop

Postby DaveJ » Wed Aug 13, 2014 10:47 am

Just to add another bit of info. if I
Code: Select all
CreateFolder "[tempdir]barcode2"
it creates a folder ok in the temp directory so its not a Neobook permissions issue.
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: Temp directory redireting to Desktop

Postby Neosoft Support » Wed Aug 13, 2014 11:57 am

Here's what's happening: The Temp folder is a hidden directory. Like Windows Explorer, FM/FTP default setting is to not show hidden folders. Since the Temp folder is hidden you can't navigate to it. To rectify this problem you need to tell FM/FTP to show hidden files, before navigating to the Temp folder. For example:

Code: Select all
fmConnectLocal "local1" ""
fmSetFileBrowserProperties "Local1" "ShowHiddenFiles=Yes"
fmChangeDir "Local1" "[TempDir]Barcode"
...
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Re: Temp directory redireting to Desktop

Postby DaveJ » Wed Aug 13, 2014 1:38 pm

Thanks Dave, I would never have got that on my own.
It still leaves me with a slight problem that the plug-in doesn't seem to support UNC paths.
It seems that the only way is to create a mapped drives and the possibility it could clash with another mapped drive.
So that I can easily update my program without going to every machine and reinstalling the application, I make a directory on my server containing all my required files. This is then copied to the temporary directory on the local machine via its UNC path and then the main program file is run from the temp folder. When the program terminates it deletes the directory.

I don't really want to create a permanent mapped drive so I may have to rethink the concept.

Dave J
DaveJ
 
Posts: 90
Joined: Tue Dec 30, 2008 11:06 am

Re: Temp directory redireting to Desktop

Postby Neosoft Support » Thu Aug 14, 2014 11:14 am

No FM/FTP won't work with UNC paths. Maybe this is something we can address in the future.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5602
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookFM/FTP

Who is online

Users browsing this forum: No registered users and 1 guest