Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

WinXP .bat file does not work on Win7 machine

Posted on 2011-03-02
17
Medium Priority
?
735 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
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 1000 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
 
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 96

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 96

Accepted Solution

by:
Lee W, MVP earned 1000 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 96

Expert Comment

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

Expert Comment

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

Featured Post

What Is Blockchain Technology?

Blockchain is a technology that underpins the success of Bitcoin and other digital currencies, but it has uses far beyond finance. Learn how blockchain works and why it is proving disruptive to other areas of IT.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

722 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