Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Space in filename
Name: lw1990 Date: June 26, 2009 at 09:35:42 Pacific OS: Windows server 2003 Subcategory: Batch
Comment:
Hi, I'm running a batch file to delete some old log files in the "Microsoft SQL Server" folder. It works fine when I test it in a short path like "C:\testfolder", but if I use the path with a space in the folder name like this "C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\LOG200", it will not delete the file. The message showing:"The system cannot find the file in C:|Program ". That means the program ignored the path after the space if the folder name. So how can I work with the space in the path of the file in batch program?
I'm quite surprised you ignore that rule introduced since Windows 95.
0
Response Number 2
Name: lw1990 Date: June 26, 2009 at 14:47:37 Pacific
Reply:
Yes, the path\filename is embraced in the double quotes as I said in the comment. But it is ignored by the batch processing.
Thanks.
0
Response Number 3
Name: Mechanix2Go Date: June 26, 2009 at 17:52:32 Pacific
Reply:
Posted here and in DOS. LOL
Neither shows the bat.
===================================== If at first you don't succeed, you're about average.
M2
0
Response Number 4
Name: phongphanp Date: July 1, 2009 at 04:39:28 Pacific
Reply:
I think WINDOWS had more complex in security than DOS, if you know the method such as New file format that can difference from FAT , FAT32 , HTFS ,I think you may study formating also.
Doing any in DOS is a good thing for batch file programming
0
Response Number 5
Name: Mechanix2Go Date: July 1, 2009 at 05:09:27 Pacific
Reply:
That clears it right up.
===================================== If at first you don't succeed, you're about average.
Summary: Hello. I would to rename blah1_car_test.txt blah2_car_test.txt TO blah1_test.txt blah2_test.txt also a seperate script that replaces spaces in a filename with underscores "blah1 test.txt" "blah2 te...
Summary: In my experience, whitespace (spaces, tabs, newlines) between TR and TD tags don't translate into spaces in the display. But, whitespace between a TD and the contained code will cause the problem desc...