Topics

Issues with FTP from Windows 10 PC

Jim Stephenson
 

I have an old application in V9.4 that pulls a text file off of an AS/400 that has a list of items for an order. I then use that file to compare against items being scanned by handheld scanners. Everything is working fine. But I now need to add a new label format to scan.

I am testing this on my own computer which is running Win/10 Pro. The normal computers that scanning is being done from are still Win/7.

The part I am struggling with is on my computer when I go to get the file  from the AS/400.

I have a program that, in a subtask creates a FTP Command file, named 'GetOrderFile.FTP', that looks like this:

open [IP Address]
UserID
Password
cd FTPINV
Get PT18774 M:\ScannedOrdersOut\PT18774
disconnect
bye

After the file is created I then do an Exit operation that looks like  the following:

Trim (I)&'GetFile.bat'             I is a virtual with the path for the bat file.

The 'bat' file contains:

ftp -i -s:M:\ScannedOrdersOut\GetOrderFile.FTP

After the file is received I then process it through  some other tasks.

On my computer only, when I do the exit operation it runs each step in the command file, just like it should. Except when it comes to the 'Get' command. It runs it, but just stops after that. It never returns the text file I am expecting.

If I go to a command line and run  the 'bat' file it runs just fine. It is only when I run it from an exit operation that it gets stuck.

I have verified that the command file is getting created in the correct location and the exit is looking for the bat file in the right folder.

Is there something different that needs to be done in Windows 10?

Thanks,
Jim

Jacques
 

Hi Jim,

 

Did you check WHERE that file is stored (if stored).

I propose you a small utility called Everything, that can be downloaded from https://www.voidtools.com/

This is an incredibly fast utility that is looking for any file, on any device connected to your PC.

It will search for every file with the string you’re looking for, within a tenth of a second.

In that example, looking for “ami83”

 

 

It did look on different device…

Then, selecting a file, you have all Windows options, copy, open, print….

I did need it to look for a scan program that was hiding the scanned result in an unexpected place…

May be that will help ???

Good luck, and take care.

 

Jacques

 

adding '-d' might help, it turns on debugging
ftp -d -i -s:....

removing '-i' might help too, because '-i' turns on interactive mode.

also verify if you really use ftp.exe from c:\windows\system32\ ,   bye running 'where ftp.exe'        

Jim Stephenson
 

Luuk,

According to the Windows 10 Ftp documentation:  -i   Disables interactive prompting during multiple file transfers.

I ran 'where' and it is finding in the correct folder.

I will try the -d switch.

Thanks,
Jim

On Wed, May 20, 2020 at 10:19 AM Luuk <luuk34@...> wrote:
adding '-d' might help, it turns on debugging
ftp -d -i -s:....

removing '-i' might help too, because '-i' turns on interactive mode.

also verify if you really use ftp.exe from c:\windows\system32\ ,   bye running 'where ftp.exe'        

 

When using 'get' there is no question, so with, or without '-i' makes no difference for this script.

With 'mget' you can get a quesion about overwriting, which makes the '-i' option valuable....