Solved

WinXP .bat file does not work on Win7 machine

Posted on 2011-03-02
17
734 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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

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

Expert Comment

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

Expert Comment

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

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

The Windows functions GetTickCount and timeGetTime retrieve the number of milliseconds since the system was started. However, the value is stored in a DWORD, which means that it wraps around to zero every 49.7 days. This article shows how to solve t…
This article provides a convenient collection of links to Microsoft provided Security Patches for operating systems that have reached their End of Life support cycle. Included operating systems covered by this article are Windows XP,  Windows Server…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Suggested Courses

623 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