Over 1 million tech questions and answers.

Sub folder file zip individually and rename file name through batch file.

Q: Sub folder file zip individually and rename file name through batch file.

Hi all,
I need help to create windows batch file for following requirements.
1. Remove .txt and .log file format in sub folders.
2. Zip individual file inside any sub folders and give file name through command prompt.
3. Create sub folder zip file include file zip

Read other answers
RELEVANCY SCORE 200
Preferred Solution: Sub folder file zip individually and rename file name through batch file.

I recommend downloading and running Reimage. It's a computer repair tool that has been proven to identify and fix many Windows problems with a high level of success.

I've used it in the past to identify and fix everything from blue screens (BSOD's), ActiveX errors, corrupt files and processes, dll/exe/sys errors, recover lost memory, Windows update problems, defragging, malware removal etc.

You can download it direct from this link http://downloadreimage.com/download.php. (This link will automatically start a download of Reimage that you can save to your computer.)

RELEVANCY SCORE 136.4

Hello all , i am new to batch programming.

I wish to have a batch file to read .apk file from folder and then copy it to another folder. Then it should rename the copied apk file to test.apk

eg:
i have a file in folder e:\apps\angrybirds.apk , I want to copy this angrybirds.apk to d:\apps and rename it to test.apk

Here the file names in the e:\apps\ will be changing. So what ever may be the name , it should read the name of the file from e:\apps\ folder , copy it to d:\apps\ and rename it to "test.apk" . Test.apk is a fixed rename
 

A:Solved: Batch file to copy a file from folder and rename it in another folder

Read other 12 answers
RELEVANCY SCORE 124.4

Ok I'm totally at a loss on how to word this so I'm just going to write it out the best that I can...

First I have a batch file that I'm writing that will convert mp4 files to mp3 files (I have a lot) for a buddies band using ffmpeg.

Here's the code that I'm using:

ffmpeg -i folder\video.mp4 -f mp3 -ab 160000 -vn "\different folder\music.mp3"

what I would like to do is add to this so that I don't have to write out this code for every file I have... :/

I have the mp4 files in one folder and than the mp3 files are saving to another folder.

So here's an example of what the code will do if it isn't clear yet.

Folder 1:

video1.mp4
video2.mp4
video3.mp4

what it should do is grab video1.mp4 and convert it.

ffmpeg -i folder\video1.mp4 -f mp3 -ab 160000 -vn "\different folder\music1.mp3"

and than move onto the next one

ffmpeg -i folder\video2.mp4 -f mp3 -ab 160000 -vn "\different folder\music2.mp3"

and than the next one

ffmpeg -i folder\video3.mp4 -f mp3 -ab 160000 -vn "\different folder\music3.mp3"

It's going to have to grab the name from the mp4 file and insert it for the mp3 file.

I can get around pretty good in cmd if it's basic commands but when it comes to something like this I'm a little confused...

Thanks for the help in advance!
I'll see what i can do about searching some more on what I would have to do and if I find the solution I'll post it here if it isn't already answered.

A:Batch File that grabs file names from folder to insert into batch file

A DOS "for /f" loop should do the trick, although changing the filename extension for the output to do everything in one line escapes me at the moment.

Perhaps you could do a dir .\folder\*.mp4/s/b > mp4s.txt, then make a copy of that and edit each line to rename the file to the destination name, and save it as mp3s.txt. Then you just feed both the source (mp4s.txt) and destination (mp3s.txt) filesnames into the for /f loop which handles the ffmpeg conversion.

Quite a crude solution and you'd have to handpatch the destination filenames, but i can't think of how to get a source mp4 filename and then just change the extension.

Read other 3 answers
RELEVANCY SCORE 122.4

I'm working on a batch file that will download a file I maintain, look for a string of text, and if it doesn't find the string, rename a file or folder, or change the file or folder's attributes to read-only.

I think I can handle the last part, and I already have the ftp part done, but I am having a hard time finding any good resource for the text string lookup/IF statement.

Any help is greatly appreciated. I'm new here, please excuse my ignorance if I am posting in the wrong area or violating any rules.

Thanks,
Jash
 

A:Batch file to compare text and rename file or driectory on fail

Read other 6 answers
RELEVANCY SCORE 111.6

Dear All,

I need to create a batch file which can read the size of file(e.g. 1kb, 2kb...etc) from specific folder and detect 0kb file and convert it to text file (showing 0kb file size) with alarm.

I am not really sure how to write command for this batch file. Please help :-(
 

A:How to create a batch file to read size of file on specific folder path

Read other 10 answers
RELEVANCY SCORE 111.6

I am trying to write a batch program the list the current directory files that end in *.dwg
into a file on my C drive.
I have used the following code:
dir *.dwg /b >C:FileListing.txt
start notepad C:FileListing.txt

This code only gives file names in the current directory.
I need to have a list of path and file names in the file FileListing.txt
Is there a way to do that without including subdirectories??

Thank you,
 

A:Solved: Batch file to list file names in current Folder.

Read other 9 answers
RELEVANCY SCORE 111.2

I have a computer that is a drone specifically for an outside LED sign. This computer is designed to never shut off and doesn't have any other program on it besides Operating System and the sign software. I need to create a batch file that I can place in the "start-up" folder that will open the program (LEDStudio10) and open the file that I want to play. I have already tried multiple attempts and I was hoping someone out there in sevenforums world would be able to point me in the right direction.

A:batch file open file for program in the startup folder

Task Scheduler. Create a new/basic task. You can invoke your batch script there. This can occur after boot completes, after user logon, etc. You can set it to run daily weekly hourly, etc. You can even have it delay X (preseleted time amounts) minutes/hours after boot/logon if you want.

Task Scheduler - Create New Task

Read other 1 answers
RELEVANCY SCORE 111.2

I want a batch to select and open a random link file in a folder i have. All the links are music videos I like to listen to, and I kind of want to just have an option for 'surprise me!'.
I can change the file names if I have to, and I have a basic batch file ability. I know the simple commands, but nothing of the variables, signs-involving commands (&%!?), etc.

Also, I want to learn a whole lot more about programming/java/batch file, so it'd be awesome if any code could be explained. Thank you, in advance

A:I need a batch file to open a random file within a certain folder/path

There's a free Windows scripting language called Autoit3 that would do this task easily using these functons:

Random
_FileListToArray

AutoIt - AutoItScript
It has a Basic like syntax and is easy to learn.

Another popular scripting for Windows is AutoHotkey
AutoHotkey: macro and automation Windows scripting language

The syntax can be confusing but it has object support and is more powerful.

Of course there are tons of others for Windows:
Rexx
Python
Perl
Ruby

Here's a list. The details for each tell which OS are supported:
Free Programming Languages - Freebyte's Guide to

Read other 5 answers
RELEVANCY SCORE 106

I have multiple folders where I am trying to rename the file extensions in each.

ren *.tif *.gif This will only work in the current folder but I need all files to be changed from tif to gif.

Any help is greatly appreciated...
 

A:Batch rename file extensions

Read other 6 answers
RELEVANCY SCORE 106

I have several "Discography" folders for my music. That is to say that I arrange these folders by artist name, within which I arrange subfolders by year of album release.

So, let's say for my Van Halen folder, I'll have various subfolders listed as such:
[1978] Van Halen
[1979] Van Halen II
[1980] Women and Children First
[1981] Diver Down
[1983] 1984

...so on and so forth.

Every so often, I'll have a bunch of folders that are named accordingly:

(1985) 5150
(1988) OU812
(1991) For Unlawful Carnal Knowledge

See the difference? I want to batch rename the parentheses into square brackets. But with several thousand such folders, I want to be able to just indicate that I want the "()" to be changed to "[]".

Is there any software or otherwise some sort of Windows XP shortcut that I can use to do that?

Thanks in advance!

A:How Can I Batch Rename File Folders?

Anyone...?

Read other 2 answers
RELEVANCY SCORE 104.8

So I have folders full of tv shows and a program that gives them all matching thumbnails but it saves them as .tbn files and my media server wants .jpg. So i wrote this script to run from my vidoes folder which contains all my tv shows.

Code:
@for /r %%i in (*.tbn) do ren "%%~fi" "%%~ni.jpg"
But now I am using xbmc as well and it looks for many thumbnails as .tbn so I want to change the script to rename any .tbn that is not named season00.tbn (00 being any two digits). If anyone could help me code this it would be much appreciated I tried for hours cause I know it should be a very simple if statement added in there but everything I try either stops renaming anything or still renames everything.
 

A:Solved: Help with a File rename Batch script!

Read other 8 answers
RELEVANCY SCORE 104.8

I create batch files to rename many files at a time
they work ok but whenever i try to rename a file with an accented character
i.e. the following line

ren "c:\expresión\méxico.txt" "mexico-file.txt"

produces the following error

"File Not Found" even though I'm pretty sure the file is there
 

A:Batch file to rename accented characters

Welcome to TSG!

The Command Prompt uses a different codepage (list of characters) than Windows does, so the characters don't match. The accented é typed into a batch file in notepad is not the same character that the Command Prompt sees. Dir shows the é but when run in a batch file it doesn't match.
To work, you need to change the codepage in your batch file.
The Command Prompt uses codepage 437 usually (type Chcp at the prompt to see which is being used), Windows uses 1252 for Latin based languages in most locales.
This will save the current codepage, change it, rename the file, then change it back. You can also make an entry in the registry so the Command Prompt will always open using the 1252 codepage if needed.
Code:
For /F "Tokens=2 Delims=:" %%I In ('Chcp ') Do Set /A _CurCP=%%I
Chcp 1252
ren "c:\expresión\méxico.txt" "mexico-file.txt"
Chcp %_CurCP%

 

Read other 1 answers
RELEVANCY SCORE 104.8

I ran Combofix trying to regain control of my old Dell XPS Gen 5.
The only problem is that to took all of my programs and dumped then into a quarantined folder with a .vir extension.
I tried to fix it with advice on another forum and they said you have to convert them all back manually.
Is that really true?
Why won't there be a batch converter to restore them to what they were before Combo fix problem occurred?
I still think it's infected, but at this point I'd rather get all my files back first.
The infection seems to reside in the svchost process somewhere... as it sucks up resources.
I've taken it off the net till I can get it straightened out.

Any help would be much appreciated.

A:Is there a batch file converter to fix cmobo vir rename?

Please read the following; ComboFix usage, Questions, Help - Look here - http://www.bleepingcomputer.com/forums/topic273628.html .If you have a ComboFix log, you can post that, along with a description of your problem, at BC Virus, Trojan, Spyware, and Malware Removal Logs - http://www.bleepingcomputer.com/forums/forum22.html .If you have no CF log and want to initiate a new topic in the VTSMR forum without supplying a ComboFix log...you can follow the directions provided in Steps 6-9 of Preparation Guide, Before Using Malware Removal Tools and Requesting Help - http://www.bleepingcomputer.com/forums/topic34773.html .Louis

Read other 1 answers
RELEVANCY SCORE 104.8

I’m very much a novice when it comes to batch files.
Any help at all to point me down a path to solving this would be much appreciated.

The Problem 1:
I have around 15k CAD files i need to check the extension and rename to DGN.
Someway of have the batch file checks all the sub folders of the main CAD file and change and files that do not have the proper extension to DGN.

The file system is as follows:
L:\Michael\Organized Updated Drawings\32\CAD\A\32-A-009.DGN
The main structure is the bold section.

I have a directory legend with all the numbers and letters used in the file system.
You first have the number area the drawing is in and then if it’s a cad file, next are the letter(s) which determines what discipline it is (water, electric, etc).
The Problem 2:
I also have an additional 10k CAD files that where mass imported in a single folder to sort through.

Each file has varying extensions that denote what area the file belongs to in the paper mill I work for.

The old system would save them as such.
5232168419.70K
5213541516.30I
5516684651.80S

I need to change the extension of each file to DGN.
Like this:
5232168419.DGN
5213541516.DGN
5516684651.DGN

I did figure out how to create a list.txt of the files and pull that into excel.
I was using ="ren "&A1&" "&D1 to rename the extensions all to DGN.

I think i would be better to if i can place them in sub folders based on there original extension.

Such as if the file is like this one.... Read more

A:Using a batch file to find and rename files.

Read other 6 answers
RELEVANCY SCORE 104.8

Hi All,

I am trying to write a batch file that will rename all the files in a folder with a date and time stamp at the end of the file. For example if the file name is

123456.txt

I want to rename that to

123456_20100624.txt

This is what I got so far.
Code:

For /F "tokens=1-3,5-8 delims=/:. " %%a in ("%TIME% %DATE%") do (set _dt=%%g%%e%%f%%d-%%a%%b%%c)

PushD C:\test
FOR /f %%a in ('dir /A-D /on /B "*.*"') DO (rename "%%a" "%_dt%.txt")
PoPD

I am trying to do a directory listing and then to rename them. But I don't know how to hold the name of the file and the date at the same time to be added to the filename. Any help is appreciated!!. thanks!
 

A:Batch File rename multiple files

Read other 7 answers
RELEVANCY SCORE 104.8

Hey all,

Last night i renamed a bunch of files. Is there a way to undo all of that?

the changes i made last night were pretty much

36327780_p0_master1200 >>> 36327780_p0

system restore doesn't restore files and documents, so that one's a dead end...

Read other answers
RELEVANCY SCORE 104

Windows XP Home Edition.
iTunes 7.6.1.9

I am adding audiobooks to iTunes and used File Renamer to rename all the file names from 001-048. When I added these files to iTunes, the files names reverted back to the original w1-w12 (repeated 3 times) & t1-12.

How can I rename the files in a batch so I don't have to do through every file individually to rename them. I have some audiobooks with 19 discs and doing it this way would take forever.

Thanks a bunch for your help!

Cathie
 

Read other answers
RELEVANCY SCORE 102.8

In windows 7 pc whenever trying to attach a file on outlook nothing is happening or no file/folder is opening and whenever select any file on application for mounting no file or no drives are opening....

Read other answers
RELEVANCY SCORE 102.8

I require a batch file or free utility that i can redistribute from my web site to other users, (gamers) that will copy the contents of a directory inside their game to a new location and re-name the directory at the same time. Something like this;

Copy "Genesis\Vehicles\truck\diesel\4tonbaker" to "Genesis\Vehicles\truck\diesel\4tonbutcher"

The batch file needs to be run without the need for a command line box being opened, that is, if the user can double click on it or run it with a 'right click' that would be great. Problem there is, I maybe need an exe file not a batch file. The other part of the problem is that the folder to be copied may or may not be in the same location on every PC that runs the file. It may be the case that the 4tonbaker folder is on;
C:\Genesis\Vehicles\truck\diesel\4tonbaker or
D:Genesis\Vehicles\truck\diesel\4tonbaker or even
E:\Games\mystuff\Genesis\Vehicles\truck\diesel\4tonbaker

and I require the end user to have no need to know, just for the directory to be copied and renamed when and where it is found.

If possible I then want the batch file to perform a second task. I want to distribute a folder, lets say it is 4tonbutcher and in that folder there are files lets say doc1.txt, doc2.txt and doc3.txt

On any given users PC 4tonbaker has these same named files but the content is different to the ones in my folder 4tonbutcher, I want to update the newly created folder, 4tonbutcher with the new txt files I d... Read more

A:Batch file or Exe to copy & rename directory and update files

Sounds like you need a windows shell program, I'm not expert enough to help you with this

Here's a nice tutorial:

Win32 Shell Scripting Tutorial

Off topic: this is trivial to do in UNIX, I can whip up a shell script for that in no time...

Read other 1 answers
RELEVANCY SCORE 102.4

Hi all,

Any idea how to write Batch File .bat to copy file from File Sharing & FTP Hosting to local directory.

Current the File Sharing & FTP Hosting is SMARTFILE.

I don't want to use WINSCP as the connector.

Thanks

A:Batch File .bat to copy file from File Sharing & FTP Hosting

Hi Chacha,

Give this batch file a try. All text in red, you should adjust before running.


Code:
@echo off
(
echo.Username
echo.Password
echo.lcd C:\Some\local\directory
echo.cd /Some/server/path
echo.binary
echo.get Some_file_to_download.txt
echo.bye
) > "%TEMP%\_%~n0.ftp"
ftp -s:"%TEMP%\_%~n0.ftp" "12.34.56.78"
del "%TEMP%\_%~n0.ftp"

Read other 1 answers
RELEVANCY SCORE 102.4

Hi,
I have a question  that how to copy file from remote desktop user drive to my local machine using  xcopy or any other protocol.

This is my server path "\\Trail01" and here is the file location "c:\Users\ashique.sheikh\Desktop\Day2.R"
How can i give this is in my batch file. I have used this
net use "\\Trail01" "[email protected]" "/USER:ashique.sheikh"
XCOPY /Y \\Trail01\c:\users\ashique.sheikh\Desktop\Day2.R  "D:\VMI"
But its not working. It is give path error.
How can i download this or is there any other way to do it?

Read other answers
RELEVANCY SCORE 99.2

I would like to know if there is a way to open a file in a program. Basically I want something like this (this is totally wrong):

open "C:Users\*My name*\My Documents\run.swf" in "C:\Program Files (x86)\Mozilla Firefox\firefox.exe

Thanks
 

A:Create a batch file to open a certain file in a certain file

The more standard way to do that is to use the start cmd. You call the program first and the file name second.

start "" "c:\windows\notepad.exe" "c:\somepath\logfile.txt"
 

Read other 2 answers
RELEVANCY SCORE 97.2

Dear all,
I want to use windows scheduler to check a file in a folder. If the file is exist then execute a script from another folder to upload the text files into the server. when the text files upload process is done then rename the files. Done.

But If the file didnt exist then check it every 15 minutes. 
How do I do this using windows scheduler. 

Thanks & regards,
S17
  

Read other answers
RELEVANCY SCORE 96.8

A folder with a .txt file that was just edited or created, saved and closed, going up one level to rename the folder, I get the dreaded;
"The action can't be completed because the folder or a file in it is open in another program."

I can use Unlocker (a wonderful program) to do so, but that should be unnecessary. If I close the Explorer window and reopen it, I can rename the folder.

This seems to be related to that cached thumbnail long standing problem which doesn't seem to be fixed according to all the topics I have seen. But, that seems to apply to deleting files, not renaming folder where the file exists.

I always use the 'details' view in Explorer and thumbnails are turned off.

Ideas??

A:Can not rename folder that has a text file that was just edited

I have no idea if this will work but it shouldn't hurt anything. UpdateEnv I wrote to do things like flush the Registry changes to disk without logoff. It simply calls the AutoIt built in function EnvUpdate() 3 times. When Explorer is hanging onto something it may not work. But it would only take a short time to find out.

Download page is here:
Miles Ahead Software

Read other 1 answers
RELEVANCY SCORE 96.8

I accidently deleted of some stuff in the registry that cause I can't rename folder and the error said "can't find the specified file", I try everything including remove everything and reinstall windows as usual, but I can not do this, because I need media recovery. but when I create the recovery disk the error appear "The system could not find the environment option that was entered". please help  

A:can't find the specified file when rename folder in windows 8

Is that Windows 8 or Windows 8.1?
 
Create your installation media here: http://windows.microsoft.com/en-us/windows-8/create-reset-refresh-media
 
Even if you have not updated to 8.1 I would expect the above to work, as 8.1 was after all a free update.
 
However, I have not tested and have not Web searched for results.

Read other 4 answers
RELEVANCY SCORE 96.8

Since 2 days, in a certain folder, I cant rename, move or delete folders or files. Now, it has spread to my desktop as well. If I rename a folder, even a new folder, the name changes ''magically'' within seconds to restore to its previous name. If I move the folder or file, it comes back and if I delete it, it restores. I tried to make a system restore, even format (!), the problem persists. HELP?!

A:Can't rename, delete or move folder or file

what are the properties of the folder?

Read other 8 answers
RELEVANCY SCORE 96.8

Since 2 days, in a certain folder, I cant rename, move or delete folders or files. Now, it has spread to my desktop as well. If I rename a folder, even a new folder, the name changes ''magically'' within seconds to restore to its previous name. If I move the folder or file, it comes back and if I delete it, it restores. I tried to make a system restore, even format (!), the problem persists. HELP?!

A:Can't rename, delete or move folder or file

Quote:





Originally Posted by NickyBromow


Since 2 days, in a certain folder, I cant rename, move or delete folders or files. Now, it has spread to my desktop as well. If I rename a folder, even a new folder, the name changes ''magically'' within seconds to restore to its previous name. If I move the folder or file, it comes back and if I delete it, it restores. I tried to make a system restore, even format (!), the problem persists. HELP?!




Hi nickyBromow,

This definitely sounds like some kind of malware.

Can you confirm you have performed a full format of your hard drive and a fresh windows install?
Is your user account an admin account?

L

Read other 6 answers
RELEVANCY SCORE 96.8

1. Situation : Unable to rename file/folder in Windows 7
    (Not working with F2 / dropdown menu - rename.)
2. OS in use: Windows 7 enterprise (IT team cannot support the situation)
3. Detail
    - Rename function is not working - do not have any pop-up alert.
    - Not limited to particular type of files or folder (unable to all type)
    - Only way to rename file is save in different name
    - when create new folder - Name of the folder is automatically set (New Folder, New Folder(2),...)

Read other answers
RELEVANCY SCORE 96.8

Summary:
On Windows (tested XP + Vista) if I save a file from an application (tested Word and FileMaker Pro) into a folder, user cannot rename folder while the original application is open.

Steps to Reproduce:
Create a 'test' folder on desktop
Open Microsoft Word
Save document into 'test' folder
Go to desktop and try and rename the 'test' folder to 'test renamed'

Actual Result:
Folder cannot be renamed - Word document saved locks folder

Expected Result:
Should be able to rename the folder
 
Workaround:
Close application used to create file

A:Rename folder blocked after file saved to folder

Hi Fmdeveloper, Thank you for reporting it. This issue should be caused by the application need to monitor the destination folder. This behavior causes folder is locking. If you use the Notepad to do this test, the issue won't occur. The request should be an application code request, we cannot resolve the issue on OS side. Thank you for your understanding. I will report this issue to our Office Team as a request. Regarding to FileMaker Pro, it is recommended to contact their support to ask for request. Hope it helps.
Best regards,
 
Robinson Zhang
TechNet Subscriber Support in forum
If you have any feedback on our support, please contact [email protected]
 
 

Read other 6 answers
RELEVANCY SCORE 96.4

Structure:
• I have a network directory that stores photos of individuals in jpg format. There may be only 2 pics of each person, or there may be 7 pics.
• Each persons pics are stored in a randomly named directory / subdirectory. dont have any control over the original program, it's just the way it was written, does not seem to follow any logical pattern, possibly a HEX naming structure based off the date & time, who knows (I will include a sample directory tree at the end of the post).
• Included within each of these created directories, along with the pictures, is a standard text file (filename "B.TXT") which includes the date the picture was taken, the persons name, and other information.
• Each time a person comes in and their picture is taken, the program: (i) creates the random directory (ii) stores the pics (iii) creates the "B.TXT" file with the persons information (iv) generates several other program specific files that I have no need for.
• The program names each of the pictures with the exact same names, which is why they are stored in different directories, so they will not overwrite. The retention period on each individuals directory, pics and files is approximately 40 days.

MFXX0000.jpg (Forward facing)
MLXX0000.jpg (Left facing)
MRXX0000.jpg (Right facing)
STXX0000.jpg (Identifying marks picture 1)
STXX0001.jpg (Identifying marks picture 2)

• As stated above, sometimes there is only the MFXX0000.jpg and MRXX0000.jpg files,... Read more

A:vbs or bat file copy / rename based on txt file in that directory

Wow, no takers yet ? I see there has been a few lookers, but no one - just a bump on the thread to get another look

many thanks to anyone that will give me a hand
 

Read other 1 answers
RELEVANCY SCORE 96

Originally Posted by hiphopper


To the OP: Doesn't it ask you to enter your admin credentials? It should be as simple as that.

When you get the dialog box saying "You'll need to provide Administrator permission to copy to this folder" what options are you given?



I modified the registry to add "Take Ownership" and followed your instructions. I am the only user on my computer and the only administrator, but I still can't delete a file or rename it. It still says that I need to be an administrator to delete this file and my only options are "Cancel" or "Try again".

A:Window 10 won't let me delete or rename a file in my Download folder

Hello dmd, and welcome to Ten Forums.

What file are you trying to delete or rename, and what is it's full path?

In addition, please post a screenshot showing the file's owner and permission properties to see if there may be an issue there.

Screenshots and Files - Upload and Post in Ten Forums

Read other 1 answers
RELEVANCY SCORE 94.8

File Explorer usually (not always but most of the time) became not responding for 30-60 seconds when creating new folder or renaming a folder within a library. During it hang, opening another File Explorer and browse to the same folder will see the folder is not created or renamed yet. After 30-60 seconds, the folder is created or renamed without any error.

The issue only happen within a library. If i create or rename folder within the same folder under direct path (e.g. D:\Music\) then there is no hang issue. However, if i access the same folder under library (i.e. Library > Music) then it usually hang.

Tried with other existing Library or create new Library and all had same issue as long as it is within library. Also tried with different hard drive and it was not hard drive specific issue.

Any idea?

Read other answers
RELEVANCY SCORE 94.8

Im using Visual Studio 2008
This is my first program
I renamed the program for the forum.

If I remove the paths and execute my .exe from the \AppData\local\ folder where the settings.ini file is it works fine, but I don't want have to run the program from there.
I tried using %Username% for relative paths, but the computer can't follow the path. Do i have to write code to get the current username or how do programmers do this?

Here's part of the program

Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If My.Computer.FileSystem.FileExists("C:\Users\%Username%\AppData\Local\X PROGRAM\Settings2.ini") Then
MsgBox("Already loaded")
Else
' Kill all X PROGRAM process
Dim pProcess() As Process = System.Diagnostics.Process.GetProcessesByName("X PROGRAM")

For Each p As Process In pProcess
p.Kill()
Next

MsgBox("Working...")
My.Computer.FileSystem.RenameFile("C:\Users\%Username%\AppData\Local\X PROGRAM\Settings.ini", "Settings2.ini")
My.Computer.FileSystem.RenameFile("C:\Users\%Username%\AppData\Local\X PROGRAM\Settings1.ini", "Settings.ini")
System.Diagnostics.Process.Start("C:\Program Files\X PROGRAM\xprogram.exe")
End If
End Sub
Here is the error

Code:
ERROR MESSAGE BOX
Unhandled exception has occurred in your application. If you click ATA Continue, the application will ignore this error and attempt to
... Read more

A:How do i rename a file in the current users \AppDat\Local folder

substitute " & Environ("USERNAME") & "
for USERNAME

Code:

My.Computer.FileSystem.RenameFile("C:\Users\" & Environ("USERNAME") & "\AppData\Local\Microsoft\Windows Sidebar\Settings.ini", "Settings2.ini")

 

Read other 1 answers
RELEVANCY SCORE 94.8

I'm having a really strange problem and am wondering if anyone has encountered this. I tried to save a file and got an error on saving it, so I quit the program. The file appears as if it was never saved and doesn't show up in directory listing (GUI or cmd.exe).

However, if I try to rename any other file to that filename, it says "Cannot rename file, because file exists" and appends a number to the end. I cannot remove the number. This happens both in the GUI and cmd.exe as well.

So, basically cmd.exe del says the file does not exist, but ren says a duplicate file name exists....

Tried restarting as well.

I have no idea how to delete that "ghost" of a file so I can actually use the filename. I checked folder options and it's not a hidden file or anything like that - it just (doesn't) exist, but it does?

A:Cannot Rename File Because File (Doesn't) Exists

open disk management ..if you don't know how to find it, just right click on "computer" from the start menu and select manage, then scroll down to disk management to open it.
right click on the partition where you tried to save the file.. or C:\ if you don't have extra partitions or more than one HDD
select properties and click on the "tools" tab
click "check now" under error checking, and on the next pop up, check 'automatically fix file system errors' and press start.. select yes when asked if you would like to schedule for the next restart, then restart your computer and let the disk check run.
If that doesn't work there are other options

Read other 8 answers
RELEVANCY SCORE 94.8

I've been searching the web on how to accomplish this but am coming up empty handed so I am hoping someone here can help...

I want my batch file to read a random line from a text file into an environment variable - can this be done?

I am using Windows 2000.
 

A:Batch File -- Read Random Line from External File into an Environment Variable

Read other 6 answers
RELEVANCY SCORE 94.4

How to create a batch file that will move files based on the file type?

My Requirement : I need a batch file to copy all .doc files in all my HardDisk to a removable disk say (Z: drive) . Can anyone make it possible using a batch file?Please...Its urgent...

A:How to create a batch file that will move files based on the file type

Download XXCopy
XXCOPY, A Versatile File Management Utility --- Boldly Extended Xcopy
This is a vastly improved and extended version of DOS XCopy
Sorry, can't remember the syntax, but its quite simple if you read the manuel carefully :-)
Put the command line in a .bat file and it will run

Read other 4 answers
RELEVANCY SCORE 94.4

I created this batch file to log certain users logins. It creates a text file to log in, but doesn't populate any of the data to it. Could someone please take a look at it and see what I did wrong. I'm new to writing batch files.

Thanks in advance. Here is the code.

@echo off
set target=JDoe
if %username% == target echo %username% %date% %time% %computername% >> c:\logfile.txt
 

A:Solved: Batch file creates text file but does not populate data to it

target is a variable. You have to surrournd it with %% like any other variable.
Code:

C:\>set target=Squashman

C:\>if %username% == %target% echo %username% %date% %time% %computername% >> c:
\logfile.txt

C:\>type logfile.txt
Squashman Fri 05/23/2008 10:34:14.74 BUMBLE-BEE

C:\>

 

Read other 3 answers
RELEVANCY SCORE 94.4

I am wondering if anyone can provide the equivalent to this linux script. When run against a text file with one entry per line being the name of a directory, it deletes the named directories.

On linux, I run this against the text list.
#!/bin/bash
while IFS='' read -r line || [[ -n "$line" ]]; do
rm -R $line
done < "$1"

I am not sure how to make it do the same for Windows. I can do this, but I'm hoping there's a way to delete based on what's in the text file. Also, wouldn't want it to prompt for deletion of each, but to just delete.

@echo on
cd \
cd %USERPROFILE%
dir /D /N 0
pause
for /D %%f in (XX*) do rmdir %%f /s
pause
%comspec% /k
pause


Thank you

Read other answers
RELEVANCY SCORE 94

Hi there forum,

how do you change the Visual effects using a batch file or registry file.

Thanks,

Edward.

A:How to change visual effects using batch file or registry file?

Hello Edward, and welcome to Ten Forums.

The links in the blue note box under OPTION FOUR in the tutorial below may be able to help with this.

Visual Effects Settings - Change in Windows 10

Read other answers
RELEVANCY SCORE 94

Hi all,

Please help!! I'm having a problem to copy some files from a folder.
My folder have lots of files and is there any way for me to write a batch file to copy only files according to "date modified"? For example last week files or yesterday files.

Please help!! Urgent!!!
Thank you.
 

A:Urgent!! Copy file by date modified using Batch File.

Take a look at XXCOPY: http://www.xxcopy.com/index.htm
 

Read other 2 answers
RELEVANCY SCORE 94

More as an alternative to twiddling my thumbs than anything else, I tried to produce a batch file that would count up the number and size of files in a folder, as well as the number and size of files with each extension. Hence it would say how many word documents I have and how much space they're taking up, etc.

I've managed to get a vaguely working model, but the output formatting is terrible (I just wanted it to say X bytes in Y "Z" Files, none of that ugly dotted variable names) and I have failed to get it to equate .htm and .html, .jpg and .jpeg, etc.
Code:
@ECHO OFF
REM THIS BATCH FILE ITTERATES THROUGH ALL THE SUBFOLDERS AND FILES IN A FOLDER (IDEALLY A DRIVE)
REM IT TOTALS THE NUMBER OF FILES CONTAINED IN THAT FOLDER, AND THE SIZE OF THOSE FILES.
REM IT ALSO TOTALS THE NUMBER AND SIZE OF FILES WITH EACH EXTENSION IT ENCOUNTERS.
REM ALL INFORMATION IS THEN PRINTED TO THE SCREEN AND FTYPEDST.TXT

IF EXIST FTypeDst.txt ERASE FTypeDst.txt
ECHO. >FTypeDst.txt
ATTRIB +A FTypeDst.txt

ECHO SCANNING FILE TREE FOR FILE EXTENSION DISTRIBUTION
ECHO Please Wait Paitently. . .

(SET /A ALLNUMBER = 0) & (SET /A ALLSIZE = 0)

REM cycle through the current directory and subs, Increment Allnumber, Allsize, define and increment Number of * files, size of * files.
FOR /R %%F in (*) DO (
SET /A ALLNUMBER += 1
SET /A ALLSIZE += %%~ZF
IF NOT DEFINED Number.of.%%~XF.files (SET /A Number.of.%%~XF.files = 0)
IF NOT DEFINED Size.of.%%~XF.files (SET /A Size.of.%%~X... Read more

A:Solved: File Type Distribution analysis: Batch File.

Posted via Mobile Device
You would be better off using third party software that already does this. Plenty of them out there.
I personally would check the extension of each file using the cmd extensions of a for loop. then do an if statement for each file type you want to keep track of. then use a call statement to branch to a function that adds up the file sizes and number of files.
 

Read other 3 answers
RELEVANCY SCORE 94

Hi there forum,

how do you change the Visual effects using a batch file or registry file.

Thanks,

Edward.

Read other answers
RELEVANCY SCORE 94

I've come into contact with Mandriva Linux. I know of a concept called standard permissions, that it provides. It's pretty convienient. I don't exactly know how it really works under the hood or anything, and I don't need to know exactly how it works right now either, even though it's probably available.

What I want to do, in effect, is create a feature pretty close to equivelant of this feature, only for Windows XP. I want to set standard permissions using a batch file. Whenever this batch file is run as administrator it can enforce the permissions. What are these permissions it enforces? Well, what I want is for these permissions to be gotten from a text file. The syntax in no way resembles the syntax of the Linux file I'm describing.

Basically the syntax is this:
PATH <TAB> MODE <TAB> USER1,USER2,... <TAB> PERM
PATH <TAB> MODE <TAB> USER1,USER2,... <TAB> PERM
...
The path is the path to a file or folder in exact syntax. The mode is one of the switches that can be given for XCACLS in the Windows Resource Kit thingy. This can be replace, edit, etc. The users are the user or group to add/replace/remove/etc, and there is a comma allowed so more than one user or group is allowed to be specified. The permissions are the permissions that you can specify in the utillity.

So the first thing the script needs to do, is call some program that safely detects whether or not the filesystem is NTFS or not. If the sys... Read more

A:Get ACL permissions from a text file enforced by a batch file in Windows XP

Read other 16 answers
RELEVANCY SCORE 94

Hi,

I have a file in a folder on a network drive whose path is : "\\sql\imp\ssis"

I need a windows batch file that looks into the above folder for a file with a name like : "abcd_03052012_84373.txt" .

The above file name has a date embedded in it in "ddmmyyyy" format. I want that to be extracted and put into a variable or a file somewhere so that I can read that later and store into a sql table.

Please help.
 

A:Solved: Extract Date from File Name - Using Windows Batch File

Read other 6 answers
RELEVANCY SCORE 94

If anyone can help it will be greatly appreciated,I am taking A + Essentials and my instructor isn't explaining it,

A:How to switch file type name to contents using a batch file for notepad

If you are as it appears you are paying for a Course for a Comptia A+ certification and the teacher isn't doing the job why haven't you gone to the school and asked them to switch you to a course with a different instructor? Or Demand a refund?

When I got my A+ back in 2000 it wasn't that hard to pass. I believe it was two tests and I was over 95% on both with no training course. I was experienced in computers and doing things and They did have a sample test as I recall it.

And of course that old standby Google
http://www.google.com/search?sclient=psy-ab&hl=en&site=&source=hp&q=A+%2B+Essentials&btnK=Google+Search

I'm afraid I can't help you further as the tests have changed a lot over the years.

Read other 1 answers
RELEVANCY SCORE 94

Hi Guys,

I want to make one batch file which daily copies yesterday's files from one folder & paste it to another folder.

I.e.
C:/111 folder has following files.
1.zip had yesterday's date
2.zip had yesterday's date
3.zip had last sunday's date

now, when i will run batch file today, it only copies 1.zip & 2.zip & move to another folder C:/222

So C:/222 contains following
1.zip had yesterday's date
2.zip had yesterday's date


Please note , i have to run this batch file daily which should not require any changes.

Read other answers