Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Automatically delete files

12 Jan 2012   #11
Bigsplash

Windows 7 Ultimate x64
 
 

Still can't get it working

Here is the content of my delete.bat

CD \\DISKSTATION\BackupFolder\BeyondTv

del /q *.dat
del /q *.index
del /q *.timeindex
del /q *.header
del /q *.index.dat



Command prompt:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.

C:\Users\Lawrence>\\DISKSTATION\BackupFolder\BeyondTv\delete.bat

C:\Users\Lawrence>CD \\DISKSTATION\BackupFolder\BeyondTv
'\\DISKSTATION\BackupFolder\BeyondTv'
CMD does not support UNC paths as current directories.

C:\Users\Lawrence>del /q *.dat

C:\Users\Lawrence>del /q *.index
Could Not Find C:\Users\Lawrence\*.index

C:\Users\Lawrence>del /q *.timeindex
Could Not Find C:\Users\Lawrence\*.timeindex

C:\Users\Lawrence>del /q *.header
Could Not Find C:\Users\Lawrence\*.header

C:\Users\Lawrence>del /q *.index.dat
Could Not Find C:\Users\Lawrence\*.index.dat

C:\Users\Lawrence>


My System SpecsSystem Spec
.
12 Jan 2012   #12
JimLewandowski

 
 

Quote   Quote: Originally Posted by Bigsplash View Post
Still can't get it working

Here is the content of my delete.bat

CD \\DISKSTATION\BackupFolder\BeyondTv

C:\Users\Lawrence>
Originally (prior post in this thread) you had this:

CD C:\RecordedTV



In your script shown above, CD \\DISK..... the double-backslash \\ is to denote a NETWORK drive/path. In your test above, you can prove your CD (Change Directory) command did not work because the command prompt shown after each unsuccessful del /q command still has:

C:\Users\Lawrence>



The format for your path should be:

logicaldrive:\directorynode1\directorynode2\..... - see above CD C:\RecordedTV


It sounds like you want:

CD C:\DISKSTATION\BackupFolder\BeyondTv



Let's say you were in DOS and had your current directory pointing your F drive, your command prompt would show this:

F:\>

If you issued the CD C:\DISK..... command above it would not work. You need to add a / switch to the DIR command to tell it that you are not just changing the current working directory PATH, but are also changing the drive.

CD /D C:\DISKSTATION\BackupFolder\BeyondTv



If you only have your C drive/partition, no need to have the /D option in there on the CD command.
My System SpecsSystem Spec
12 Jan 2012   #13
Bigsplash

Windows 7 Ultimate x64
 
 

Thanks for all your patient help!

Diskstation actually is referring to my synology network attached storage, which is connected to my router via cat 6 cable.

Is it still possible to make this work?

What kind of command would I need at the command prompt to change to the NAT drive?
My System SpecsSystem Spec
.

12 Jan 2012   #14
JimLewandowski

 
 

My System SpecsSystem Spec
Reply

 Automatically delete files




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
why my files are attempting to delete automatically
my laptop's files and folders are attempting to delete automatically when i want to open any file or folder.may be it is caused by a virus.can anybody help me for this issue.
General Discussion
how to delete spam with certain keywords automatically in Yahoo! Mail
hi I've been using this Yahoo! Mail for long long time so I can't change to a new email. I usually get more than 400 spam mail in a week and I have not given away my adddress to untrusted websites or subscriptions for long time and I never click on the email. They are mostly with topics like '...
Browsers & Mail
Recycle Bin - Permanently Delete Items Automatically
Set Recycle Bin to Permanently Delete Items Immediately in Windows The Recycle Bin provides a safety net when deleting files or folders. When you delete any of these items from your hard disk, Windows places it in the Recycle Bin and the Recycle Bin icon changes from empty to full. This...
Tutorials
How to automatically delete/filter images which are smaller than X
As the title says. I need a script or program which can check images inside a folder for their size and delete/filter everything below a certain threshold. by size I mean of course the image dimensions - not the file size. for example - keep only images which are wider than 640 pixels. ...
Software
WMC won't automatically delete shows
I set WMC to only keep a certain number of episodes, (10 or less) then to keep 'Until space needed." However, it keeps recording episodes. For some, I have 30 or more episodes. I have to delete them manually by leaving WMC and doing it through Windows explorer. How do I set WMC to only keep the...
Media Center
automatically delete/move files to folders
hi all! is there something like a handy method to automatically move files depending on their extension to custom folders? (either by the time they are generated or at a specific date). ps: b.) i would be also interested in finding a method to have windows7 delete files in custom folders at a...
General Discussion


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:40.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App