Computing.Net > Forums > Disk Operating System > How do I shorten filenames in Batch

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.

How do I shorten filenames in Batch

Reply to Message Icon

Name: El-Trucha
Date: June 19, 2004 at 08:42:12 Pacific
OS: Windows XP
CPU/Ram: 1.4 GHz/224 MB
Comment:

Hello every1!!!
Look, I wanna make a batch file that deletes a file that the user type in.
----------
:file
set watitle=Select the file name.
set watext=Select the file that you hate here:
set wainput=All files (*.*);*.*
set waoutput=%userprofile%\Desktop
start /w wizapp FB FILE
if errorlevel 2 goto end
if errorlevel 1 goto select
call %wabat%
goto process

:process
::process.exe -k explorer.exe
del %waoutput%
----------
wizapp is a program that makes dialog boxes and all that.
The file I want to delete is %waoutput%, which is stored in %temp%\wabat.bat.
But the path for that file has long filenames and the batch file doesn't recognize it!!! :(
I tried with a short filename and it worked.
I really want 2 make this program!!! :)
Thanx all!! ;)

El-Trucha



Sponsored Link
Ads by Google

Response Number 1
Name: Wengier
Date: June 19, 2004 at 19:13:58 Pacific
Reply:

Hi friend El-Trucha,

You do know that NT-based systems (WinNT/2K/XP) don't have DOS, don't you? And your batch file will not work in pure DOS either (e.g. start /w ..). Therefore, you'd better ask this question in WinXP Forum or Programming Forum, as the warning messages of this forum state.

---------------
Long Live DOS!


0

Response Number 2
Name: El-Trucha
Date: June 19, 2004 at 19:23:33 Pacific
Reply:

Yeah...I was looking 4 a DEL alternative with long filenames and environment variables...but I can't find any that works!!! :(
Do u know of any???
Thanx!!!

PS: I will ask this question in those forums... ;)

El-Trucha


0

Response Number 3
Name: Wengier
Date: June 19, 2004 at 19:33:59 Pacific
Reply:

Hi El-Trucha,

DEL should work with LFN on a LFN-compatible system. However, if there are spaces in the long names, you should put quotation marks there, like:

DEL "%waoutput%"

---------------
Long Live DOS!


0

Response Number 4
Name: El-Trucha
Date: June 19, 2004 at 20:37:05 Pacific
Reply:

Yeah!! that's just what I did!!! and it worked!!! :D:D
Thanx!!! ;)

El-Trucha


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: How do I shorten filenames in Batch

How do i start up in DOS www.computing.net/answers/dos/how-do-i-start-up-in-dos/11506.html

how do i hibernate from a batch? www.computing.net/answers/dos/how-do-i-hibernate-from-a-batch/13721.html

JAMES? (How do i start up in dos) www.computing.net/answers/dos/james-how-do-i-start-up-in-dos/11517.html