Batch File Error The System Cannot Find The File Specified
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about batch file the system cannot find the path specified hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges batch script the system cannot find the file specified Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each windows 7 batch file the system cannot find the path specified other. Join them; it only takes a minute: Sign up windows .BAT Error The system cannot find the path specified up vote 1 down vote favorite for /F "tokens=*" %%a in ('dir /od /b %* ^| tail -n 1') the system cannot find the path specified in cmd do SET MY_T2=%%a echo %MY_T2% running the above .bat file in windows 7 enterprise command prompt terminal c:\tools>t2.bat c:\tools>for /F "tokens=*" %%a in ('dir /od /b ^| tail -n 1') do SET MY_T2=%%a The system cannot find the path specified. c:\tools>SET MY_T2=t2.bat c:\tools>echo t2.bat t2.bat why do I get the error "The system cannot find the path specified." If I change the above .bat file so that the output gets redirected to a file and then I set
Cmd.exe The System Cannot Find The Path Specified
the variable from the redirected output file, I don't get the above error. c:\tools>t1.bat c:\tools>dir /od /b | ttail -n 1 1>g:\t1.txt c:\tools>set /p MY_T1= 0
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers
The System Cannot Find The Drive Specified Batch
or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question windows cannot find batch file x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; the system cannot find the file specified cmd copy it only takes a minute: Sign up System cannot find the path specified up vote 2 down vote favorite 1 When I execute my batch file and write the output to a text file, I am getting error message "system http://stackoverflow.com/questions/35079635/windows-bat-error-the-system-cannot-find-the-path-specified cannot find the path specified" in the command prompt. I have to find which line in my batch script, throws this error or the path which is not found. Note: As I have so many lines in my script, I cannot go through each line and check for the path. I have to get the path or the line which causes this error when this error comes. batch-file share|improve this question asked Jan 7 '13 at 5:19 Ramya 462613 add http://stackoverflow.com/questions/14190307/system-cannot-find-the-path-specified a comment| 2 Answers 2 active oldest votes up vote 4 down vote accepted The quickest way to debug an error like this would be to Remove @echo off if you have that at the top of your script Remove any >nul's or similar you have for any commands Add a pause at the very end of the script Now run the script and look at the output for each of the commands until you find the error, and then you can see which command it did it for. share|improve this answer answered Jan 7 '13 at 8:50 Bali C 17.4k2376111 Still can't figure out what wrong :( what i want to do: echo 500>"%~dp0save\%user%-%pass%\count.txt" –M.S.M. Mar 22 '14 at 16:24 add a comment| Did you find this question interesting? Try our newsletter Sign up for our newsletter and get our top new questions delivered to your inbox (see an example). Subscribed! Success! Please click the link in the confirmation email to activate your subscription. up vote 0 down vote Look the first place in your batch that requires the path, i.e., a call like "copy" or "del", create a new line after it and put exit. Repeat further down the batch file until the problem appears. share|improve this answer answered Jan 7 '13 at 5:24 akTed 17218 1 That can be done, but Is that possible to print the path which it cannot
Popular Forums Computer Help Computer Newbies Laptops Phones TVs & Home Theaters Networking & Wireless Windows 7 Windows 10 Cameras All Forums News Top Categories Apple Computers Crave https://www.cnet.com/forums/discussions/batch-file-windows-cannot-find-the-specified-path-622854/ Deals Google Internet Microsoft Mobile Photography Security Sci-Tech Tech Culture Tech Industry Photo Galleries Video Forums Video Top Categories Apple Byte Carfection CNET Top 5 CNET Update Googlicious How To Netpicks Next Big Thing News On Cars Phones Prizefight Tablets Tomorrow Daily CNET Podcasts How To Top Categories Appliances Computers Gaming Home Entertainment Internet Mobile Apps Phones Photography Security Smart Home cannot find Tablets Wearable Tech Forums Speed Test Smart Home Top Categories Tour CNET Smart Home Smart Home News Smart Home How To Best Smart Home Devices Cars Top Categories Car Reviews Best Cars New Cars Used Cars Deals Top Categories Cheapskate Best Tech Under $50 All Deals Tech Deals Non-Tech Deals Audio Deals Cell Phone Deals Desktop Deals Laptop Deals Hard Drive the system cannot & Storage Deals Printer Deals Tablet Deals Camera Deals Monitor Deals Software Deals TV Deals Web Hosting VPN Services WordPress Hosting Domain Names Download Sign In / Join Sign In to CNET Join CNET Member Benefits My Profile Forums Sign Out US Other editions United Kingdom Australia China France Germany Japan Korea CNET en EspaƱol CNET Forums Windows 7 Batch file "windows cannot find the specified path" Windows 7 forum About This ForumCNET's Forum on Windows 7 is the best source for finding help or troubleshooting advice from a community of experts. Discussions cover Windows installation, driver problems, crashes, upgrading, service packs, and other Windows 7-related questions.Real-Time ActivityMy Tracked DiscussionsFAQsPoliciesModerators Alert Batch file "windows cannot find the specified path" by simi6666666 / July 10, 2014 4:00 AM PDT Whenever I try to open a bat file it says "windows cannot find the specified path" error message. Previously it worked fine. But 3 days back I started seeing this problem.I googled and tried some solution . But still I get this message.I can run as admin or run from cmd.But can't dou