WUGNET, the Windows User Group Network
Your Complete Resource Center for "The Best" in Shareware, Computing Tips and Support, Windows Industry News... and much more!
Home Forums Shareware Windows Tips Hot Offers FREE Newsletters Arcade Contact Us About Partners
Search WUGNET: RSS Feeds RSS Feeds Advertise with WUGNET    |    Shareware eBooks
HomeHome FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Windows cannot copy file. The filename or extension is too..

 
Goto page Previous  1, 2
   Home -> Windows -> General Discussion RSS
Next:  Download Tajima DGML by Pulse X2 Maestro Ver 13 &..  
Author Message
Ahmed

External


Since: Jan 19, 2007
Posts: 24



(Msg. 9) Posted: Fri Oct 30, 2009 1:31 pm
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: microsoft>public>windowsxp>general (more info?)

hello pegasus
are u serious. u want me to go around 300 computers and delete the profile
or rename the filename. this is far from being a solution. and why it happens
at all the mandatory profile should be deleted on log off.

"Pegasus [MVP]" wrote:

> In newsgroups you will never receive a reply by personal EMail. Replies made
> by respondents will only be visible in the newsgroups themselves.
>
> Unfortunately you are restricted to a total path+file name length of 260
> characters. You will have to rename/delete the files with the excessively
> long names on each and every PC. There is no other way.
>
>
> "Ahmed" <Ahmed.DeleteThis@discussions.microsoft.com> wrote in message
> news:7FCE230B-0332-4AF2-866F-458DA8157524@microsoft.com...
> > hey
> > sorry for not answering fast coz i thought i would get an e mail when
> > someone answers but i didnt. any way it does not matter what the file name
> > is
> > coz even if i delete it when any other user logs in and get to the same
> > web
> > site it will come back and we get the same problem. now you will ask which
> > website and i will say there are many web site that will leave some jpg
> > files
> > with a very long file names. and i have 5 labs with 20 computer in each so
> > it
> > is impossible to log in every computer and delete the temparory internet
> > files or delete the profile.
> >
> >
> > "Pegasus [MVP]" wrote:
> >
> >>
> >> "Ahmed" <Ahmed.DeleteThis@discussions.microsoft.com> wrote in message
> >> news:15FC0B5D-223B-4CDA-A1AB-70CB0013F1CA@microsoft.com...
> >> > hey
> >> > we are having this new problem in our labs that windows create the
> >> > mandatory
> >> > profile which is located locally in the same workstation becouse there
> >> > is
> >> > a
> >> > file thats too long in the temporary internet files. the profile should
> >> > be
> >> > deleted on log off but it does not for a reason that i dont know or
> >> > becouse
> >> > it is locked. i tried using the UPHclean up "both the old the new and
> >> > the
> >> > beta" and it didnt work. i tried to put a log off script to delete the
> >> > profile but it works only when we log in as admin. this problem is
> >> > killing
> >> > me. any help will be appriciated.
> >>
> >> I would rename the file with the exessively long name.
> >>
> >>
> >> .
> >>
>
>
> .
>
Back to top
Login to vote
Pegasus [MVP]

External


Since: Mar 15, 2009
Posts: 57



(Msg. 10) Posted: Fri Oct 30, 2009 5:05 pm
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

No, you don't "go around to 300 PCs" but if you are responsible for 300 of
them then it is imperative that you acquire skills in scripting and managing
them remotely. Administrators without such skills are ineffective. Here are
a couple of methods to resolve the current issue:
- Include a suitable "delete" instruction in your logon script.
- Execute a batch file from your console that gets the 300 machine names
from a text file, then deletes the offending file remotely.


"Ahmed" <Ahmed.TakeThisOut@discussions.microsoft.com> wrote in message
news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> hello pegasus
> are u serious. u want me to go around 300 computers and delete the profile
> or rename the filename. this is far from being a solution. and why it
> happens
> at all the mandatory profile should be deleted on log off.
>
Back to top
Login to vote
Ahmed

External


Since: Jan 19, 2007
Posts: 24



(Msg. 11) Posted: Sat Oct 31, 2009 9:41 am
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

1-a delete instruction cannot be executed in logon script coz the user does
not have previlidges and you cannot delete the user profile while he is
logged in. you may say log off script and for the same reason the user does
not have enough previliges to delete the profile "you can try it" coz i
already tried it. it works if an admin logs in and logs out.
2- regarding the second part "batch file"
the computers are distributed on 2 buildings in different labs and the
problem happens when the users visit some website so i dont know when the
problem happens and in which computer and i cant run the batch file everytime
a user logs off.
i already have all those solutions that you talked about but they are not
effecient acctually. i have a dosen of scripts now but all needs admin rights
to run att log off.

"Pegasus [MVP]" wrote:

> No, you don't "go around to 300 PCs" but if you are responsible for 300 of
> them then it is imperative that you acquire skills in scripting and managing
> them remotely. Administrators without such skills are ineffective. Here are
> a couple of methods to resolve the current issue:
> - Include a suitable "delete" instruction in your logon script.
> - Execute a batch file from your console that gets the 300 machine names
> from a text file, then deletes the offending file remotely.
>
>
> "Ahmed" <Ahmed DeleteThis @discussions.microsoft.com> wrote in message
> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> > hello pegasus
> > are u serious. u want me to go around 300 computers and delete the profile
> > or rename the filename. this is far from being a solution. and why it
> > happens
> > at all the mandatory profile should be deleted on log off.
> >
>
>
> .
>
Back to top
Login to vote
Pegasus [MVP]

External


Since: Mar 15, 2009
Posts: 57



(Msg. 12) Posted: Sat Oct 31, 2009 2:05 pm
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

*** See below.

"Ahmed" <Ahmed.DeleteThis@discussions.microsoft.com> wrote in message
news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
> 1-a delete instruction cannot be executed in logon script coz
> (=because) the user does not have previlidges and you cannot
> delete the user profile while he is logged in. you may say log off
> script and for the same reason the user does not have enough
> previliges to delete the profile "you can try it" coz (=because)
> i already tried it. it works if an admin logs in and logs out.
*** This is getting a little puzzling. If the user does not have
*** sufficient privileges to delete a file that resides in his own
*** profile folder, how did he create it in the first place? Is
*** it perhaps that the file has the read-only attribute set, which
*** needs to be removed before he can delete the file?

> 2- regarding the second part "batch file"
> the computers are distributed on 2 buildings in different labs and the
> problem happens when the users visit some website so i dont know when the
> problem happens and in which computer and i cant run the batch file
> everytime
> a user logs off.
*** You can insert an instruction like this one into the logon script:
*** if exist "%UserProfile%\...\Long File Name.url" del
""%UserProfile%\...\Long File Name.url"
*** This does not work because the file name is too long then subst.exe
*** can be used to shorten the path.

> i already have all those solutions that you talked about but they are not
> effecient acctually. i have a dosen of scripts now but all needs admin
> rights
> to run att log off.
*** I would not worry about the solutions being efficient or not, as
*** long as they are effective (=as long as they work).

> "Pegasus [MVP]" wrote:
>
>> No, you don't "go around to 300 PCs" but if you are responsible for 300
>> of
>> them then it is imperative that you acquire skills in scripting and
>> managing
>> them remotely. Administrators without such skills are ineffective. Here
>> are
>> a couple of methods to resolve the current issue:
>> - Include a suitable "delete" instruction in your logon script.
>> - Execute a batch file from your console that gets the 300 machine names
>> from a text file, then deletes the offending file remotely.
>>
>>
>> "Ahmed" <Ahmed.DeleteThis@discussions.microsoft.com> wrote in message
>> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
>> > hello pegasus
>> > are u serious. u want me to go around 300 computers and delete the
>> > profile
>> > or rename the filename. this is far from being a solution. and why it
>> > happens
>> > at all the mandatory profile should be deleted on log off.
>> >
>>
>>
>> .
>>
Back to top
Login to vote
Ahmed

External


Since: Jan 19, 2007
Posts: 24



(Msg. 13) Posted: Mon Nov 02, 2009 12:34 am
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

helloo again
first of all i would like to thank you for the effort in trying to help me.
second i solved in anther way.
i put the delete script in the startup script instead of the log off script
and i removed the log off from shutdown menu so the user will choose to
restart always and i will be sure that the profile is deleted at start up and
it works.

the problem is that it is not only one file that cause the problem so i
cannot use

if exist "%UserProfile%\...\Long File Name.url" del

there are many website that cause the problem with files with different
extensions like url or jpg .... etc

best regards

"Pegasus [MVP]" wrote:

> *** See below.
>
> "Ahmed" <Ahmed.RemoveThis@discussions.microsoft.com> wrote in message
> news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
> > 1-a delete instruction cannot be executed in logon script coz
> > (=because) the user does not have previlidges and you cannot
> > delete the user profile while he is logged in. you may say log off
> > script and for the same reason the user does not have enough
> > previliges to delete the profile "you can try it" coz (=because)
> > i already tried it. it works if an admin logs in and logs out.
> *** This is getting a little puzzling. If the user does not have
> *** sufficient privileges to delete a file that resides in his own
> *** profile folder, how did he create it in the first place? Is
> *** it perhaps that the file has the read-only attribute set, which
> *** needs to be removed before he can delete the file?
>
> > 2- regarding the second part "batch file"
> > the computers are distributed on 2 buildings in different labs and the
> > problem happens when the users visit some website so i dont know when the
> > problem happens and in which computer and i cant run the batch file
> > everytime
> > a user logs off.
> *** You can insert an instruction like this one into the logon script:
> *** if exist "%UserProfile%\...\Long File Name.url" del
> ""%UserProfile%\...\Long File Name.url"
> *** This does not work because the file name is too long then subst.exe
> *** can be used to shorten the path.
>
> > i already have all those solutions that you talked about but they are not
> > effecient acctually. i have a dosen of scripts now but all needs admin
> > rights
> > to run att log off.
> *** I would not worry about the solutions being efficient or not, as
> *** long as they are effective (=as long as they work).
>
> > "Pegasus [MVP]" wrote:
> >
> >> No, you don't "go around to 300 PCs" but if you are responsible for 300
> >> of
> >> them then it is imperative that you acquire skills in scripting and
> >> managing
> >> them remotely. Administrators without such skills are ineffective. Here
> >> are
> >> a couple of methods to resolve the current issue:
> >> - Include a suitable "delete" instruction in your logon script.
> >> - Execute a batch file from your console that gets the 300 machine names
> >> from a text file, then deletes the offending file remotely.
> >>
> >>
> >> "Ahmed" <Ahmed.RemoveThis@discussions.microsoft.com> wrote in message
> >> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> >> > hello pegasus
> >> > are u serious. u want me to go around 300 computers and delete the
> >> > profile
> >> > or rename the filename. this is far from being a solution. and why it
> >> > happens
> >> > at all the mandatory profile should be deleted on log off.
> >> >
> >>
> >>
> >> .
> >>
>
>
> .
>
Back to top
Login to vote
Pegasus [MVP]

External


Since: Mar 15, 2009
Posts: 57



(Msg. 14) Posted: Mon Nov 02, 2009 7:05 am
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

While I accept that there may be more than one web site that generates
exessively long file names, I do not think that there are many of them. They
tend to be malicious sites that want to prevent visitors from deleting the
files they generate. I suspect that some of your users visit sites that they
should not visit.

One way to deal with the issue is to run a script at logon time to identify
all temporary internet files with excessively long names. When you have the
list then you can examine it and discuss the issue with the users. The
script below will create such a list. Depending on the number of temporary
internet files, it might take half a minute or more to execute. Do not
retype the script - use copy and paste instead. The result will be visible
in c:\LongNames.txt

@echo off
set Len=240
if exist c:\LongNames.txt goto :eof
echo %date% %time:~0,5% %UserName% %ComputerName% > c:\LongNames.txt
set Scr=c:\TempVBS.vbs
set VB=echo^>^>%Scr%
cd 1>nul 2>%Scr%
%VB% Set oFSO = CreateObject("Scripting.FileSystemObject")
%VB% Set oWshShell = CreateObject("WScript.Shell")
%VB% sFolder = oWshShell.ExpandEnvironmentStrings( _
%VB% "%UserProfile%\Local Settings\" _
%VB% ^& "Temporary Internet Files\Content.ie5")
%VB% Set oFolder = oFSO.GetFolder(sFolder)
%VB% For Each oSubFolder In oFolder.SubFolders
%VB% For Each oFile In oSubFolder.Files
%VB% sPath = oFile.path
%VB% if len(sPath) ^> %Len% then WScript.Echo sPath
%VB% Next
%VB% Next
cscript //nologo %Scr% >> c:\LongNames.txt
del %Scr%


"Ahmed" <Ahmed.TakeThisOut@discussions.microsoft.com> wrote in message
news:362019CD-44F9-4603-B794-7638D190168B@microsoft.com...
> helloo again
> first of all i would like to thank you for the effort in trying to help
> me.
> second i solved in anther way.
> i put the delete script in the startup script instead of the log off
> script
> and i removed the log off from shutdown menu so the user will choose to
> restart always and i will be sure that the profile is deleted at start up
> and
> it works.
>
> the problem is that it is not only one file that cause the problem so i
> cannot use
>
> if exist "%UserProfile%\...\Long File Name.url" del
>
> there are many website that cause the problem with files with different
> extensions like url or jpg .... etc
>
> best regards
>
> "Pegasus [MVP]" wrote:
>
>> *** See below.
>>
>> "Ahmed" <Ahmed.TakeThisOut@discussions.microsoft.com> wrote in message
>> news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
>> > 1-a delete instruction cannot be executed in logon script coz
>> > (=because) the user does not have previlidges and you cannot
>> > delete the user profile while he is logged in. you may say log off
>> > script and for the same reason the user does not have enough
>> > previliges to delete the profile "you can try it" coz (=because)
>> > i already tried it. it works if an admin logs in and logs out.
>> *** This is getting a little puzzling. If the user does not have
>> *** sufficient privileges to delete a file that resides in his own
>> *** profile folder, how did he create it in the first place? Is
>> *** it perhaps that the file has the read-only attribute set, which
>> *** needs to be removed before he can delete the file?
>>
>> > 2- regarding the second part "batch file"
>> > the computers are distributed on 2 buildings in different labs and the
>> > problem happens when the users visit some website so i dont know when
>> > the
>> > problem happens and in which computer and i cant run the batch file
>> > everytime
>> > a user logs off.
>> *** You can insert an instruction like this one into the logon script:
>> *** if exist "%UserProfile%\...\Long File Name.url" del
>> ""%UserProfile%\...\Long File Name.url"
>> *** This does not work because the file name is too long then subst.exe
>> *** can be used to shorten the path.
>>
>> > i already have all those solutions that you talked about but they are
>> > not
>> > effecient acctually. i have a dosen of scripts now but all needs admin
>> > rights
>> > to run att log off.
>> *** I would not worry about the solutions being efficient or not, as
>> *** long as they are effective (=as long as they work).
>>
>> > "Pegasus [MVP]" wrote:
>> >
>> >> No, you don't "go around to 300 PCs" but if you are responsible for
>> >> 300
>> >> of
>> >> them then it is imperative that you acquire skills in scripting and
>> >> managing
>> >> them remotely. Administrators without such skills are ineffective.
>> >> Here
>> >> are
>> >> a couple of methods to resolve the current issue:
>> >> - Include a suitable "delete" instruction in your logon script.
>> >> - Execute a batch file from your console that gets the 300 machine
>> >> names
>> >> from a text file, then deletes the offending file remotely.
>> >>
>> >>
>> >> "Ahmed" <Ahmed.TakeThisOut@discussions.microsoft.com> wrote in message
>> >> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
>> >> > hello pegasus
>> >> > are u serious. u want me to go around 300 computers and delete the
>> >> > profile
>> >> > or rename the filename. this is far from being a solution. and why
>> >> > it
>> >> > happens
>> >> > at all the mandatory profile should be deleted on log off.
>> >> >
>> >>
>> >>
>> >> .
>> >>
>>
>>
>> .
>>
Back to top
Login to vote
Ahmed

External


Since: Jan 19, 2007
Posts: 24



(Msg. 15) Posted: Tue Nov 03, 2009 12:16 pm
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanx again for the script. i just made a small change in it just make it
easier for me i change the line
if len(sPath) ^> %Len% then WScript.Echo sPath
into
if len(sPath) ^> %Len% then oFile.delete
hope you dont mind and i ran it as vbscript att log off. i will put it in
one of my labs 2moro to see if it works coz it worked for me today in my test
workstation.
some of the website that made the problem are the BBC , the university home
page and youtube and others.

"Pegasus [MVP]" wrote:

> While I accept that there may be more than one web site that generates
> exessively long file names, I do not think that there are many of them. They
> tend to be malicious sites that want to prevent visitors from deleting the
> files they generate. I suspect that some of your users visit sites that they
> should not visit.
>
> One way to deal with the issue is to run a script at logon time to identify
> all temporary internet files with excessively long names. When you have the
> list then you can examine it and discuss the issue with the users. The
> script below will create such a list. Depending on the number of temporary
> internet files, it might take half a minute or more to execute. Do not
> retype the script - use copy and paste instead. The result will be visible
> in c:\LongNames.txt
>
> @echo off
> set Len=240
> if exist c:\LongNames.txt goto :eof
> echo %date% %time:~0,5% %UserName% %ComputerName% > c:\LongNames.txt
> set Scr=c:\TempVBS.vbs
> set VB=echo^>^>%Scr%
> cd 1>nul 2>%Scr%
> %VB% Set oFSO = CreateObject("Scripting.FileSystemObject")
> %VB% Set oWshShell = CreateObject("WScript.Shell")
> %VB% sFolder = oWshShell.ExpandEnvironmentStrings( _
> %VB% "%UserProfile%\Local Settings\" _
> %VB% ^& "Temporary Internet Files\Content.ie5")
> %VB% Set oFolder = oFSO.GetFolder(sFolder)
> %VB% For Each oSubFolder In oFolder.SubFolders
> %VB% For Each oFile In oSubFolder.Files
> %VB% sPath = oFile.path
> %VB% if len(sPath) ^> %Len% then WScript.Echo sPath
> %VB% Next
> %VB% Next
> cscript //nologo %Scr% >> c:\LongNames.txt
> del %Scr%
>
>
> "Ahmed" <Ahmed.RemoveThis@discussions.microsoft.com> wrote in message
> news:362019CD-44F9-4603-B794-7638D190168B@microsoft.com...
> > helloo again
> > first of all i would like to thank you for the effort in trying to help
> > me.
> > second i solved in anther way.
> > i put the delete script in the startup script instead of the log off
> > script
> > and i removed the log off from shutdown menu so the user will choose to
> > restart always and i will be sure that the profile is deleted at start up
> > and
> > it works.
> >
> > the problem is that it is not only one file that cause the problem so i
> > cannot use
> >
> > if exist "%UserProfile%\...\Long File Name.url" del
> >
> > there are many website that cause the problem with files with different
> > extensions like url or jpg .... etc
> >
> > best regards
> >
> > "Pegasus [MVP]" wrote:
> >
> >> *** See below.
> >>
> >> "Ahmed" <Ahmed.RemoveThis@discussions.microsoft.com> wrote in message
> >> news:41EE6C94-F36D-4DF2-B51B-E14FB284721A@microsoft.com...
> >> > 1-a delete instruction cannot be executed in logon script coz
> >> > (=because) the user does not have previlidges and you cannot
> >> > delete the user profile while he is logged in. you may say log off
> >> > script and for the same reason the user does not have enough
> >> > previliges to delete the profile "you can try it" coz (=because)
> >> > i already tried it. it works if an admin logs in and logs out.
> >> *** This is getting a little puzzling. If the user does not have
> >> *** sufficient privileges to delete a file that resides in his own
> >> *** profile folder, how did he create it in the first place? Is
> >> *** it perhaps that the file has the read-only attribute set, which
> >> *** needs to be removed before he can delete the file?
> >>
> >> > 2- regarding the second part "batch file"
> >> > the computers are distributed on 2 buildings in different labs and the
> >> > problem happens when the users visit some website so i dont know when
> >> > the
> >> > problem happens and in which computer and i cant run the batch file
> >> > everytime
> >> > a user logs off.
> >> *** You can insert an instruction like this one into the logon script:
> >> *** if exist "%UserProfile%\...\Long File Name.url" del
> >> ""%UserProfile%\...\Long File Name.url"
> >> *** This does not work because the file name is too long then subst.exe
> >> *** can be used to shorten the path.
> >>
> >> > i already have all those solutions that you talked about but they are
> >> > not
> >> > effecient acctually. i have a dosen of scripts now but all needs admin
> >> > rights
> >> > to run att log off.
> >> *** I would not worry about the solutions being efficient or not, as
> >> *** long as they are effective (=as long as they work).
> >>
> >> > "Pegasus [MVP]" wrote:
> >> >
> >> >> No, you don't "go around to 300 PCs" but if you are responsible for
> >> >> 300
> >> >> of
> >> >> them then it is imperative that you acquire skills in scripting and
> >> >> managing
> >> >> them remotely. Administrators without such skills are ineffective.
> >> >> Here
> >> >> are
> >> >> a couple of methods to resolve the current issue:
> >> >> - Include a suitable "delete" instruction in your logon script.
> >> >> - Execute a batch file from your console that gets the 300 machine
> >> >> names
> >> >> from a text file, then deletes the offending file remotely.
> >> >>
> >> >>
> >> >> "Ahmed" <Ahmed.RemoveThis@discussions.microsoft.com> wrote in message
> >> >> news:8B31DAFE-9C41-4331-9298-7C0D7BDE7CD7@microsoft.com...
> >> >> > hello pegasus
> >> >> > are u serious. u want me to go around 300 computers and delete the
> >> >> > profile
> >> >> > or rename the filename. this is far from being a solution. and why
> >> >> > it
> >> >> > happens
> >> >> > at all the mandatory profile should be deleted on log off.
> >> >> >
> >> >>
> >> >>
> >> >> .
> >> >>
> >>
> >>
> >> .
> >>
>
>
> .
>
Back to top
Login to vote
Pegasus [MVP]

External


Since: Mar 15, 2009
Posts: 57



(Msg. 16) Posted: Tue Nov 03, 2009 4:05 pm
Post subject: Re: Windows cannot copy file. The filename or extension is too lon [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"Ahmed" <Ahmed DeleteThis @discussions.microsoft.com> wrote in message
news:D8B8F6FC-C211-4AEE-B66A-22ACEF76387D@microsoft.com...
> Thanx again for the script. i just made a small change in it just make it
> easier for me i change the line
> if len(sPath) ^> %Len% then WScript.Echo sPath
> into
> if len(sPath) ^> %Len% then oFile.delete
> hope you dont mind and i ran it as vbscript att log off. i will put it in
> one of my labs 2moro to see if it works coz it worked for me today in my
> test
> workstation.
> some of the website that made the problem are the BBC , the university
> home
> page and youtube and others.

No, I don't mind at all you changing my script - in fact I'm glad you seized
the initiative. On the other hand you need to be aware that deleting files
without user confirmation can cause problems. During the testing phase I
would probably maintain a log like so:

iLen=240
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oWshShell = CreateObject("WScript.Shell")
sFolder = oWshShell.ExpandEnvironmentStrings( _
"%UserProfile%\Local Settings\" _
& "Temporary Internet Files\Content.ie5")
Set oFolder = oFSO.GetFolder(sFolder)
For Each oSubFolder In oFolder.SubFolders
For Each oFile In oSubFolder.Files
sPath = oFile.path
if len(sPath) > iLen then
WScript.Echo sPath
oFile.Delete sPath
end if
Next
Next

Remember to invoke the script like so:
cscript //nologo c:\LongNames.vbs >> "%UserProfile%\My
Documents\LongNames.txt"
Back to top
Login to vote
Display posts from previous:   
       Home -> Windows -> General Discussion All times are: Eastern Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum
Categories:
  Windows XP
 Windows Vista
 Windows Other
 Office
 Office Other
 Security
  • Home |
  • Shareware |
  • Windows Tips |
  • Hot Offers |
  • FREE Newsletters |
  • Arcade |
  • Forums |
  • eBooks |
  • About WUGNET |
  • Partners |
  • Contact

  • WUGNET Privacy Policy |
  • Link to WUGNET |
  • IT Support