Solved

WinXP .bat file does not work on Win7 machine

Posted on 2011-03-02
17
724 Views
Last Modified: 2012-06-27
I had a .bat file on a Win XP machine that executed fine.  I moved the .bat file to a Win7 machine (copied) and now it does not work.  Any clues??  
0
Comment
Question by:sburge1962
  • 7
  • 5
  • 3
  • +2
17 Comments
 
LVL 9

Expert Comment

by:AriMc
ID: 35022062
Could you post the contents of the BAT and explain how it fails?

0
 

Author Comment

by:sburge1962
ID: 35022099
cd \Program Files\SEAGULL\BlueZone\Transfer
ftp -s:ftp_visa

It grabs a file that we rename to "1" from the Windows server to a Unix box.  We then execute a process on the Unix box that updates records from that file.  The Unix command appears to be updating the records, however the records are never updated.  I can run the same exact .bat file on the previous XP machine, again run the Unix process and the records update.
0
 
LVL 9

Expert Comment

by:AriMc
ID: 35022165
- Does the file get transferred too so that your Unix command really gets a new file instead
  of an old one?

- Did you remember to copy the FTP-script file "ftp_visa" from your XP to W7?

0
 
LVL 9

Expert Comment

by:AriMc
ID: 35022192
Just in case you might also want to put the path containing spaces in double quotes and
supply full absolute paths, ie:

cd "c:\Program Files\SEAGULL\BlueZone\Transfer"
ftp -s:"c:\Program Files\SEAGULL\BlueZone\Transfer\ftp_visa"

0
 

Author Comment

by:sburge1962
ID: 35022194
Hmmm.  I did not copy any script file?  However, I have two .bat files that I run and the .bat files runs fine and I did not move that script either?  Where would I find this scipt file?
0
 
LVL 9

Assisted Solution

by:AriMc
AriMc earned 250 total points
ID: 35022218
The command "ftp -s:ftp_visa" instructs ftp to load a script file named ftp_visa. Since you do CD to "\Program Files\SEAGULL\BlueZone\Transfer" directory, it's probably there.

0
 

Author Comment

by:sburge1962
ID: 35022263
Niether script file is in this folder.  Here is a copy of the other .bat file that runs just fine.

cd \Program Files\SEAGULL\BlueZone\Transfer
ftp -s:ftp_eft41

The only differnce is that the files this script graps are plain text.  The other file looks to be encrypted or something?  Anyway, I can't read the contents of the file.  I am sorry I am such an idot when it comes to script files.
0
 

Author Comment

by:sburge1962
ID: 35022272
Weird.  I can see the script files when I open my FTP program that I use to transfer it from a remote FTP site into the Win7 box, but I can't see it when just viewing the folder contents locally
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 
LVL 9

Expert Comment

by:AriMc
ID: 35022290
Those script files must be somewhere on your XP machine. Try looking for ftp_visa and ftp_eft41 from the root folder of that computer.

0
 
LVL 47

Expert Comment

by:Donald Stewart
ID: 35022318
does it work this way ?

cd %ProgramFiles%\SEAGULL\BlueZone\Transfer
ftp -s:ftp_eft41
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 35022347
Would be good if you can post a screen shot of the failure.

That said, if you just copied and didn't edit, what version of Windows (x86 or x64).  Is that "Seagull" program installed and confirmed it's in the path your specifying?
0
 

Author Comment

by:sburge1962
ID: 35022361
If you could tell me how to stop the .bat file before the window closes, I can post a screen shot of what errors out.  I am not sure how to do that and the process happens so fast, I can not tell what is happening.
0
 

Author Comment

by:sburge1962
ID: 35022375
The scripts are located the the TRANSFER folder as they should be.  I am not sure why I can't view them.  Possibly a protected file?
0
 
LVL 95

Accepted Solution

by:
Lee W, MVP earned 250 total points
ID: 35022463
Run the batch file from a command prompt - don't double click it.  

If you MUST double click it, add a line at the end of the file containing pause

@echo off
echo Hello World
pause
0
 

Author Comment

by:sburge1962
ID: 35022648
This helped me determine where it is erroring.  It is not finding the file "1".  When we renamed the file "1" on the XP, it did not automatically add .txt to the file name.  Win7 does.  So, it is not finding the file because the file name is 1.txt.  I guess a stupid question, how do I save a file in Win7 as with no extention??
0
 
LVL 95

Expert Comment

by:Lee W, MVP
ID: 35022681
Put the file name in quotes when you save it.
0
 
LVL 68

Expert Comment

by:Qlemo
ID: 35022786
Or just append a dot to the file name when saving.
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Hi Friends, These registry tweaks will help you optimizing your Windows 7 system for any VDI. This will improve the machine performanance and can be used on normal systems also. These are few registry tweaks which will add value by enhancing the …
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
This Micro Tutorial will give you a basic overview of Windows Live Photo Gallery and show you various editing filters and touches to photos you can apply. This will be demonstrated using Windows Live Photo Gallery on Windows 7 operating system.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now