Solved

WinXP .bat file does not work on Win7 machine

Posted on 2011-03-02
17
732 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

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

Expert Comment

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

Featured Post

Ransomware: The New Cyber Threat & How to Stop It

This infographic explains ransomware, type of malware that blocks access to your files or your systems and holds them hostage until a ransom is paid. It also examines the different types of ransomware and explains what you can do to thwart this sinister online threat.  

Question has a verified solution.

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

Sometimes people don't understand why download speed shows differently for Windows than Linux.Specially, this article covers and shows the solution for throughput difference for Windows than a Linux machine. For this, I arranged a test scenario.I…
First some basics on Windows 7 Backup.  It has 2 components one is a file based backup which is stored in .zip files each zip is split at around 200 Megabytes and there is the Image Backup which is as the name implies a total image of the partition …
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
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.

685 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