Hello.
When I use killdir to delete a file, only names from 8 characters or shorter
wil delete.
But names like MYFILE~1.TXT don't work with killdir.
FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT
KillDir FileName$
Above doesn't work.
When I do it in DOS prompt with DEL C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT, then
it works.
I can't do it with other names because I get the shortnames (with tildes
"~") from another Windows program.
This program gives no long, full names.
Is there another command to delete a file, given with the short names?
For example to use the DOS command DEL. 4 4974
"Fritsch Kieftenbelt uit Raalte (Bij Marienheem)"
<fr***************@NOSPAM.wanadoo.nl> wrote in message
news:43**********************@news.wanadoo.nl... Hello.
When I use killdir to delete a file, only names from 8 characters or
shorter wil delete. But names like MYFILE~1.TXT don't work with killdir.
FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT KillDir FileName$
Above doesn't work.
When I do it in DOS prompt with DEL C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT,
then it works. I can't do it with other names because I get the shortnames (with tildes "~") from another Windows program. This program gives no long, full names.
Is there another command to delete a file, given with the short names? For example to use the DOS command DEL.
Never heard of KillDir.. Sorry for being stupid but what is it? I know the
KILL command and you supply a filename. ..
Have you tried just using SHELL to shell out to DOS and execute the Delete?
Beste wensen van New York.
Fritsch try this for a file
Dim FileName as String
FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT
Kill FileName$
for a dir and all its files try this
add a reference to the Microsoft Scripting Runtime type library
Dim fso As New Scripting.FileSystemObject
fso.DeleteFolder "C:\PROGRA~1\MYDIRS~1" ',True ',True deletes read only
files also
George
"Fritsch Kieftenbelt uit Raalte (Bij Marienheem)"
<fr***************@NOSPAM.wanadoo.nl> wrote in message
news:43**********************@news.wanadoo.nl... Hello.
When I use killdir to delete a file, only names from 8 characters or shorter wil delete. But names like MYFILE~1.TXT don't work with killdir.
FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT KillDir FileName$
Above doesn't work.
When I do it in DOS prompt with DEL C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT, then it works. I can't do it with other names because I get the shortnames (with tildes "~") from another Windows program. This program gives no long, full names.
Is there another command to delete a file, given with the short names? For example to use the DOS command DEL.
You can also use the following:
public sub KillDir(byval dirName as string)
dim cmd as string
if dir(dirname) = "" then exit sub
cmd = environ$("Comspec") & " /c rm /q/s " & dirname
shell cmd
end sub
Mike Ober.
"George Bashore" <gb******@bcpl.net> wrote in message
news:M-********************@comcast.com... Fritsch try this for a file
Dim FileName as String FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT Kill FileName$
for a dir and all its files try this add a reference to the Microsoft Scripting Runtime type library
Dim fso As New Scripting.FileSystemObject fso.DeleteFolder "C:\PROGRA~1\MYDIRS~1" ',True ',True deletes read
only files also
George
"Fritsch Kieftenbelt uit Raalte (Bij Marienheem)" <fr***************@NOSPAM.wanadoo.nl> wrote in message news:43**********************@news.wanadoo.nl... Hello.
When I use killdir to delete a file, only names from 8 characters or shorter wil delete. But names like MYFILE~1.TXT don't work with killdir.
FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT KillDir FileName$
Above doesn't work.
When I do it in DOS prompt with DEL C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT, then it works. I can't do it with other names because I get the shortnames (with tildes "~") from another Windows program. This program gives no long, full names.
Is there another command to delete a file, given with the short names? For example to use the DOS command DEL.
On Sun, 29 Jan 2006 19:20:16 +0100, "Fritsch Kieftenbelt uit Raalte
\(Bij Marienheem\)" <fr***************@NOSPAM.wanadoo.nl> wrote: Hello.
When I use killdir to delete a file, only names from 8 characters or shorter wil delete. But names like MYFILE~1.TXT don't work with killdir.
FileName$ = "C:\PROGRA~1\MYDIRS~1\MYFILE~1.TXT KillDir FileName$
Above doesn't work.
I doubt that it is short file names
If the current directory is the one you want to kill, then one cannot
RmDir the directory
- same goes if one is in a Dir() loop inside the directory
It would be interesting to see the code for KillDir() This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Melissa |
last post by:
Hi,
I'm new to the group and haven't had a chance to read the FAQ, but I
have a question that's driving me crazy. If anyone here can help me
with this or can point me to another site or...
|
by: Anthony Lansbergen |
last post by:
Hi,
My (pre)compiler(s) (borland C++ builder 5 and g++) both seems to have a
problem with the new include format.
In stead of #include <iostream.h> I want to say #include <iostream>.
This...
|
by: Kevin Ollivier |
last post by:
Hi all,
On Windows, it's very common to have a string of long directories in the
pathname for files, like "C:\Documents and Settings\My Long User Name\My
Documents\My Long Subdirectory...
|
by: ROBB |
last post by:
Hi,
I'm trying to find a way to manipulate files with kill, FileCopy, Dir,
etc. The problem is that they are very long filenames, and these
commands are not reliable with pinpointing the exact...
|
by: Pieter |
last post by:
I want to be able to split regular MAX_PATH length filenames and 32K UNICODE
filenames using the \\?\ naming convention.
Are there any equivalents to _tsplitpath() for long names, or am I left to...
|
by: Seth |
last post by:
Ok, here is my setup. I have a fully functioning HTTP Handler
implemented. The handler is supposed to handle every single request
that comes in to a particular virtual directory. Thus, in IIS, I...
|
by: n33470 |
last post by:
We have a web site that is being converted from the 1.1 format into
2.0. I've noticed that after the web project has been converted, the
first time that the solution is opened in VS, all of the...
|
by: chongming |
last post by:
Hi, i want to display all the filenames on browser. However i found that if there are many filenames in that folder, result will be it will display a long list of filenames on that browser.
My...
|
by: =?Utf-8?B?SmVzcGVyLCBEZW5tYXJr?= |
last post by:
Hi,
I work in a company where we tend to use very deep folder structures and
long descriptive file names due to the nature of the analysis that we make.
I've made a program that recursively...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |