Computing.Net > Forums > Disk Operating System > Spaces in Filenames

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.

Spaces in Filenames

Reply to Message Icon

Name: Kim
Date: November 8, 2000 at 22:37:21 Pacific
Comment:

Can someone tell me how to reference a filename with spaces in the name, example, " file name".
I have a for loop that recompiles every file in the directory. It does not work because the name shave spaces in them. Please help. Thanks!



Sponsored Link
Ads by Google

Response Number 1
Name: mr o
Date: November 9, 2000 at 01:16:02 Pacific
Reply:

theres a function especially for for loops and long file names called LFNFOR

try

lfnfor on


0

Response Number 2
Name: bubbletrap
Date: November 9, 2000 at 01:19:08 Pacific
Reply:

One thing you can do is eliminate the space by replacing it with a '-' or an underscore. This can be done by using the command "REN FILE?NAME FILE-NAME".


0

Response Number 3
Name: Kim
Date: November 9, 2000 at 15:06:25 Pacific
Reply:


for %%i in (*) do ...

I used "%%i" and it worked!!
Thanks everyone.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home


Sponsored links

Ads by Google


Results for: Spaces in Filenames

edit a blank space in text file?? www.computing.net/answers/dos/edit-a-blank-space-in-text-file/3534.html

MSDOS printing with space in device name www.computing.net/answers/dos/msdos-printing-with-space-in-device-name/9862.html

HDD Space in Dos PC www.computing.net/answers/dos/hdd-space-in-dos-pc/10196.html