Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Bad command or filename

Status
Not open for further replies.

copper

IS-IT--Management
May 10, 2001
35
US
Help!

For some reason i can't not run a perl script on this one particular machine. the run script run just on other pc.

the pc in question is a Win NT 4 sp5.

here is the command: (the script use a 'move' commnand to change all file extension from .txt .fin)

m:\perl\bin\perl m:\scripts\glimport.pl

here is the error:

bad command or file name
can not move m:\exportdata\test.txt - no such file or directory




thanks
 
The error message is from the "move" command. Try re-reading the part in red.
bad command or file name
can not move m:\exportdata\test.txt - no such file or directory

So the problem has to do with the file you are trying to move "m:\exportdata\test.txt". It could be a file permissions problem.
 
it can't be a permission problem. if i manually run the move command to change all extension from .txt to .fin it work just fine. i use command prompt for this test.

beside if it is a permission issue, why does only affect this one pc. all the other pc's work just fine.


thx
 
Is your M: drive mapped on this machine, under the user's profile that is running the script?

:p
 
Just out of curiosity, can the perl script see the file at all? Try something like this:

perl -e "print ((-e 'm:\\exportdata\\test.txt')?'exists':'not-exist');" ----------------------------------------------------------------------------------
...but I'm just a C man trying to see the light
 
PaulTEG,

the drive is mapped under the user profile. beside i can issued the move command manually and it work just fine.


icrf,

i tested your script and it came back 'exists'. so it can see the file.
 
Try escaping the '\'s on the machine that doesn't work and see if that makes a difference

HTH
;P
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top